diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiocoap/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/aiocoap/default.nix | 64 |
1 files changed, 59 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiocoap/default.nix b/nixpkgs/pkgs/development/python-modules/aiocoap/default.nix index 4feb6fc185c4..af2b220a21c2 100644 --- a/nixpkgs/pkgs/development/python-modules/aiocoap/default.nix +++ b/nixpkgs/pkgs/development/python-modules/aiocoap/default.nix @@ -1,15 +1,31 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytestCheckHook -, pygments +, pythonAtLeast , pythonOlder + +# build-system +, setuptools + +# optionals +, cbor2 +, cbor-diag +, cryptography +, filelock +, ge25519 +, dtlssocket +, websockets +, termcolor +, pygments + +# tests +, pytestCheckHook }: buildPythonPackage rec { pname = "aiocoap"; version = "0.4.7"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,14 +36,52 @@ buildPythonPackage rec { hash = "sha256-4iwoPfmIwk+PlWUp60aqA5qZgzyj34pnZHf9uH5UhnY="; }; - propagatedBuildInputs = [ - pygments + nativeBuildInputs = [ + setuptools ]; + passthru.optional-dependencies = { + oscore = [ + cbor2 + cryptography + filelock + ge25519 + ]; + tinydtls = [ + dtlssocket + ]; + ws = [ + websockets + ]; + prettyprint = [ + termcolor + cbor2 + pygments + cbor-diag + ]; + }; + nativeCheckInputs = [ pytestCheckHook ]; + pytestFlagsArray = lib.optionals (pythonAtLeast "3.12") [ + # https://github.com/chrysn/aiocoap/issues/339 + "--deselect=tests/test_server.py::TestServerTCP::test_big_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_empty_accept" + "--deselect=tests/test_server.py::TestServerTCP::test_error_resources" + "--deselect=tests/test_server.py::TestServerTCP::test_fast_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_js_accept" + "--deselect=tests/test_server.py::TestServerTCP::test_manualbig_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_nonexisting_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_replacing_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_root_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_slow_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_slowbig_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_spurious_resource" + "--deselect=tests/test_server.py::TestServerTCP::test_unacceptable_accept" + ]; + disabledTestPaths = [ # Don't test the plugins "tests/test_tls.py" |