From e8e5d8cf4c9e7b97a400bf4c9e59705103422afd Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jul 2024 20:31:30 +0200 Subject: [PATCH] python3Packages.joinmarket: update to nixos 24.05 --- pkgs/python-packages/joinmarket/default.nix | 18 ++++++++++++++---- .../fix-conftest-arg-type-error.patch | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch diff --git a/pkgs/python-packages/joinmarket/default.nix b/pkgs/python-packages/joinmarket/default.nix index b083883..854f1e5 100644 --- a/pkgs/python-packages/joinmarket/default.nix +++ b/pkgs/python-packages/joinmarket/default.nix @@ -62,12 +62,22 @@ buildPythonPackage rec { pyopenssl ]; + # TODO-EXTERNAL: + # Remove this when fixed upstream. + # + # Fix the following error during checkPhase: + # File "/nix/store/...-python3.11-pytest-8.1.1/lib/python3.11/site-packages/_pytest/config/argparsing.py", line 133, in _getparser + # arggroup.add_argument(*n, **a) + # File "/nix/store/...-python3-3.11.9/lib/python3.11/argparse.py", line 1460, in add_argument + # raise ValueError('%r is not callable' % (type_func,)) + # ValueError: 'int' is not callable + patches = [ ./fix-conftest-arg-type-error.patch ]; + postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail 'txtorcon==23.11.0' 'txtorcon==23.5.0' \ - --replace-fail 'twisted==23.10.0' 'twisted==23.8.0' \ - --replace-fail 'service-identity==21.1.0' 'service-identity==23.1.0' \ - --replace-fail 'cryptography==41.0.6' 'cryptography==41.0.3' + --replace-fail 'twisted==23.10.0' 'twisted==24.3.0' \ + --replace-fail 'service-identity==21.1.0' 'service-identity==24.1.0' \ + --replace-fail 'cryptography==41.0.6' 'cryptography==42.0.5' # Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'. sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml diff --git a/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch b/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch new file mode 100644 index 0000000..a8f2743 --- /dev/null +++ b/pkgs/python-packages/joinmarket/fix-conftest-arg-type-error.patch @@ -0,0 +1,17 @@ +diff --git a/conftest.py b/conftest.py +index 1cc56d5..54b0a4c 100644 +--- a/conftest.py ++++ b/conftest.py +@@ -74,12 +74,6 @@ def pytest_addoption(parser: Any) -> None: + action="store", + default='bitcoinrpc', + help="the RPC username for your test bitcoin instance (default=bitcoinrpc)") +- parser.addoption("--nirc", +- type="int", +- action="store", +- default=1, +- help="the number of local miniircd instances") +- + + @pytest.fixture(scope="session", autouse=True) + def setup_early_if_needed(request) -> None: