about summary refs log tree commit diff
path: root/pkgs/development/python-modules/autobahn/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/autobahn/default.nix')
-rw-r--r--pkgs/development/python-modules/autobahn/default.nix164
1 files changed, 100 insertions, 64 deletions
diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix
index 2bfbc16e8f912..1efc211fcc54f 100644
--- a/pkgs/development/python-modules/autobahn/default.nix
+++ b/pkgs/development/python-modules/autobahn/default.nix
@@ -1,55 +1,57 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, attrs
-, argon2-cffi
-, base58
-, cbor2
-, cffi
-, click
-, cryptography
-, ecdsa
-, eth-abi
-, eth-account
-, flatbuffers
-, jinja2
-, hkdf
-, hyperlink
-, mnemonic
-, mock
-, msgpack
-, passlib
-, py-ecc
-# , py-eth-sig-utils
-, py-multihash
-, py-ubjson
-, pynacl
-, pygobject3
-, pyopenssl
-, qrcode
-, pytest-asyncio_0_21
-, python-snappy
-, pytestCheckHook
-, pythonOlder
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  attrs,
+  argon2-cffi,
+  base58,
+  cbor2,
+  cffi,
+  click,
+  cryptography,
+  ecdsa,
+  eth-abi,
+  eth-account,
+  flatbuffers,
+  jinja2,
+  hkdf,
+  hyperlink,
+  mnemonic,
+  mock,
+  msgpack,
+  passlib,
+  py-ecc,
+  # , py-eth-sig-utils
+  py-multihash,
+  py-ubjson,
+  pynacl,
+  pygobject3,
+  pyopenssl,
+  qrcode,
+  pytest-asyncio_0_21,
+  python-snappy,
+  pytestCheckHook,
+  pythonOlder,
   # , pytrie
-, rlp
-, service-identity
-, spake2
-, twisted
-, txaio
-, ujson
+  rlp,
+  service-identity,
+  setuptools,
+  spake2,
+  twisted,
+  txaio,
+  ujson,
   # , web3
   # , wsaccel
   # , xbr
-, yapf
+  yapf,
   # , zlmdb
-, zope-interface
+  zope-interface,
 }@args:
 
 buildPythonPackage rec {
   pname = "autobahn";
   version = "23.6.2";
-  format = "setuptools";
+  pyproject = true;
 
   disabled = pythonOlder "3.9";
 
@@ -60,48 +62,82 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "pytest>=2.8.6,<3.3.0" "pytest"
+      --replace-fail "pytest>=2.8.6,<3.3.0" "pytest"
   '';
 
-  propagatedBuildInputs = [
+  build-system = [ setuptools ];
+
+  dependencies = [
     cryptography
     hyperlink
     pynacl
     txaio
   ];
 
-  nativeCheckInputs = [
-    mock
-    pytest-asyncio_0_21
-    pytestCheckHook
-  ] ++ passthru.optional-dependencies.scram
-  ++ passthru.optional-dependencies.serialization
-  ++ passthru.optional-dependencies.xbr;
+  nativeCheckInputs =
+    [
+      mock
+      pytest-asyncio_0_21
+      pytestCheckHook
+    ]
+    ++ optional-dependencies.scram ++ optional-dependencies.serialization ++ optional-dependencies.xbr;
 
   preCheck = ''
     # Run asyncio tests (requires twisted)
     export USE_ASYNCIO=1
   '';
 
-  pytestFlagsArray = [
-    "--pyargs autobahn"
-  ];
+  pytestFlagsArray = [ "--pyargs autobahn" ];
 
-  pythonImportsCheck = [
-    "autobahn"
-  ];
+  pythonImportsCheck = [ "autobahn" ];
 
-  passthru.optional-dependencies = rec {
+  optional-dependencies = rec {
     all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr;
-    accelerate = [ /* wsaccel */ ];
+    accelerate = [
+      # wsaccel
+    ];
     compress = [ python-snappy ];
-    encryption = [ pynacl pyopenssl qrcode /* pytrie */ service-identity ];
+    encryption = [
+      pynacl
+      pyopenssl
+      qrcode # pytrie
+      service-identity
+    ];
     nvx = [ cffi ];
-    scram = [ argon2-cffi cffi passlib ];
-    serialization = [ cbor2 flatbuffers msgpack ujson py-ubjson ];
-    twisted = [ attrs args.twisted zope-interface ];
+    scram = [
+      argon2-cffi
+      cffi
+      passlib
+    ];
+    serialization = [
+      cbor2
+      flatbuffers
+      msgpack
+      ujson
+      py-ubjson
+    ];
+    twisted = [
+      attrs
+      args.twisted
+      zope-interface
+    ];
     ui = [ pygobject3 ];
-    xbr = [ base58 cbor2 click ecdsa eth-abi jinja2 hkdf mnemonic py-ecc /* py-eth-sig-utils */ py-multihash rlp spake2 twisted /* web3 xbr */ yapf /* zlmdb */ ];
+    xbr = [
+      base58
+      cbor2
+      click
+      ecdsa
+      eth-abi
+      jinja2
+      hkdf
+      mnemonic
+      py-ecc # py-eth-sig-utils
+      py-multihash
+      rlp
+      spake2
+      twisted # web3 xbr
+      yapf # zlmdb
+    ];
   };
 
   meta = with lib; {