summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/autobahn/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
committerRobin Gloster <mail@glob.in>2021-05-24 09:55:24 -0500
commit4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch)
treee2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/autobahn/default.nix
parentjq: fix build with structured-attrs on darwin (diff)
parentMerge pull request #123802 from superherointj/package-virtmanager-bugfix (diff)
downloadnixpkgs-origin/structured-attrs.tar.gz
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/autobahn/default.nix')
-rw-r--r--pkgs/development/python-modules/autobahn/default.nix81
1 files changed, 62 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix
index 386d4766bbfa..52def3d6ee17 100644
--- a/pkgs/development/python-modules/autobahn/default.nix
+++ b/pkgs/development/python-modules/autobahn/default.nix
@@ -1,35 +1,78 @@
-{ lib, buildPythonPackage, fetchPypi, isPy3k,
- six, txaio, twisted, zope_interface, cffi,
- trollius ? null, futures ? null,
- mock, pytest, cryptography, pynacl
+{ lib
+, argon2_cffi
+, attrs
+, buildPythonPackage
+, cbor
+, cbor2
+, cffi
+, cryptography
+, fetchPypi
+, flatbuffers
+, mock
+, msgpack
+, passlib
+, pynacl
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, twisted
+, py-ubjson
+, txaio
+, ujson
+, zope_interface
}:
+
buildPythonPackage rec {
pname = "autobahn";
version = "21.3.1";
+ disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
- sha256 = "e126c1f583e872fb59e79d36977cfa1f2d0a8a79f90ae31f406faae7664b8e03";
+ sha256 = "00wf9dkfgakg80gy62prg650lb8zz9y9fdlxwxcznwp8hgsw29p1";
};
- propagatedBuildInputs = [ six txaio twisted zope_interface cffi cryptography pynacl ] ++
- (lib.optionals (!isPy3k) [ trollius futures ]);
+ propagatedBuildInputs = [
+ argon2_cffi
+ cbor
+ cbor2
+ cffi
+ cryptography
+ flatbuffers
+ msgpack
+ passlib
+ py-ubjson
+ pynacl
+ twisted
+ txaio
+ ujson
+ zope_interface
+ ];
+
+ checkInputs = [
+ mock
+ pytest-asyncio
+ pytestCheckHook
+ ];
- checkInputs = [ mock pytest ];
- checkPhase = ''
- runHook preCheck
- USE_TWISTED=true py.test $out
- runHook postCheck
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "pytest>=2.8.6,<3.3.0" "pytest"
'';
- # Tests do no seem to be compatible yet with pytest 5.1
- # https://github.com/crossbario/autobahn-python/issues/1235
- doCheck = false;
+ preCheck = ''
+ # Run asyncio tests (requires twisted)
+ export USE_ASYNCIO=1
+ '';
+
+ pytestFlagsArray = [ "--pyargs autobahn" ];
+
+ pythonImportsCheck = [ "autobahn" ];
meta = with lib; {
- description = "WebSocket and WAMP in Python for Twisted and asyncio.";
- homepage = "https://crossbar.io/autobahn";
- license = licenses.mit;
- maintainers = with maintainers; [ nand0p ];
+ description = "WebSocket and WAMP in Python for Twisted and asyncio";
+ homepage = "https://crossbar.io/autobahn";
+ license = licenses.mit;
+ maintainers = with maintainers; [ ];
};
}