diff --git a/pkgs/development/python-modules/py-cid/default.nix b/pkgs/development/python-modules/py-cid/default.nix index 2f75be74fc96..f60f46f4c2f6 100644 --- a/pkgs/development/python-modules/py-cid/default.nix +++ b/pkgs/development/python-modules/py-cid/default.nix @@ -9,12 +9,14 @@ morphys, py-multihash, hypothesis, + pytest-cov-stub, + setuptools, }: buildPythonPackage rec { pname = "py-cid"; version = "0.4.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "ipld"; @@ -23,14 +25,11 @@ buildPythonPackage rec { hash = "sha256-IYjk7sajHFWgsOMxwk1tWvKtTfPN8vHoNeENQed7MiU="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "base58>=1.0.2,<2.0" "base58>=1.0.2" \ - --replace "py-multihash>=0.2.0,<1.0.0" "py-multihash>=0.2.0" \ - --replace "'pytest-runner'," "" - ''; + pythonRelaxDeps = [ "base58" ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ base58 py-multibase py-multicodec @@ -40,6 +39,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook + pytest-cov-stub hypothesis ]; @@ -48,6 +48,7 @@ buildPythonPackage rec { meta = { description = "Self-describing content-addressed identifiers for distributed systems implementation in Python"; homepage = "https://github.com/ipld/py-cid"; + changelog = "https://github.com/ipld/py-cid/blob/${src.tag}/HISTORY.rst"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ Luflosi ]; }; diff --git a/pkgs/development/python-modules/py-multiaddr/default.nix b/pkgs/development/python-modules/py-multiaddr/default.nix index b2ad11184d14..9b002fd4058e 100644 --- a/pkgs/development/python-modules/py-multiaddr/default.nix +++ b/pkgs/development/python-modules/py-multiaddr/default.nix @@ -1,38 +1,45 @@ { lib, + base58, buildPythonPackage, fetchFromGitHub, - varint, - base58, - netaddr, idna, + netaddr, py-cid, py-multicodec, + trio, pytestCheckHook, + setuptools, + psutil, + varint, + dnspython, + trio-typing, }: buildPythonPackage rec { pname = "py-multiaddr"; - version = "0.0.10"; - format = "setuptools"; + version = "0.0.11"; + pyproject = true; src = fetchFromGitHub { owner = "multiformats"; repo = "py-multiaddr"; tag = "v${version}"; - hash = "sha256-N46D2H3RG6rtdBrSyDjh8UxD+Ph/FXEa4FcEI2uz4y8="; + hash = "sha256-mlHcuLVtczp3APXJFkWbjeY7xU39eFERa8hhiOEwBSU="; }; - postPatch = '' - substituteInPlace setup.py --replace "'pytest-runner'," "" - ''; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ varint base58 netaddr + dnspython + trio-typing + trio idna py-cid + psutil py-multicodec ]; @@ -40,9 +47,22 @@ buildPythonPackage rec { pythonImportsCheck = [ "multiaddr" ]; + disabledTests = [ + # Test is outdated + "test_resolve_cancellation_with_error" + # AssertionError + "test_ipv4_wildcard" + ]; + + disabledTestPaths = [ + # Tests require network access + "tests/test_resolvers.py" + ]; + meta = { description = "Composable and future-proof network addresses"; homepage = "https://github.com/multiformats/py-multiaddr"; + changelog = "https://github.com/multiformats/py-multiaddr/releases/tag/${src.tag}"; license = with lib.licenses; [ mit asl20