From 821c943d1b51753e901d5bfd3050626e89c12c43 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:18:02 -0800 Subject: [PATCH 1/2] python310Packages.signalslot: remove weakrefmethod This is not needed by the package when on Python >= 3.4. Also add a dependency on pytest-xdist as it's asked for by the package, and it removes some warnings when running tests due to pytest reporting on unknown configuration options consumed by pytest-xdist. --- .../python-modules/signalslot/default.nix | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/signalslot/default.nix b/pkgs/development/python-modules/signalslot/default.nix index 44f1c91fc435..8c3dfc8bb58f 100644 --- a/pkgs/development/python-modules/signalslot/default.nix +++ b/pkgs/development/python-modules/signalslot/default.nix @@ -2,43 +2,53 @@ , lib , buildPythonPackage , fetchPypi +, pythonRelaxDepsHook , contexter , eventlet , mock +, pytest-xdist , pytestCheckHook , six -, weakrefmethod }: buildPythonPackage rec { pname = "signalslot"; version = "0.1.2"; + format = "setuptools"; src = fetchPypi { inherit pname version; sha256 = "sha256-Z26RPNau+4719e82jMhb2LyIR6EvsANI8r3+eKuw494="; }; - propagatedBuildInputs = [ - contexter - six - weakrefmethod - ]; - - checkInputs = [ - eventlet - mock - pytestCheckHook - ]; - - pythonImportsCheck = [ "signalslot" ]; - postPatch = '' substituteInPlace setup.cfg \ --replace "--pep8 --cov" "" \ --replace "--cov-report html" "" ''; + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = [ + contexter + six + ]; + + pythonRemoveDeps = [ + "weakrefmethod" # needed until https://github.com/Numergy/signalslot/pull/17 + ]; + + checkInputs = [ + eventlet + mock + pytest-xdist + pytestCheckHook + ]; + + pythonImportsCheck = [ "signalslot" ]; + meta = with lib; { description = "Simple Signal/Slot implementation"; homepage = "https://github.com/numergy/signalslot"; From c35afb9aeb2952b443ccd352d27ab2d47c755162 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:22:51 -0800 Subject: [PATCH 2/2] python310Packages.weakrefmethod: remove This package is only needed by Python 2. Due to its low usage within nixpkgs, I feel that it can be maintained out of tree if necessary. As a benefit, this remove one more dependency on unittest2, which is unmaintained by upstream, and which we would like to remove. --- .../python-modules/weakrefmethod/default.nix | 24 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 pkgs/development/python-modules/weakrefmethod/default.nix diff --git a/pkgs/development/python-modules/weakrefmethod/default.nix b/pkgs/development/python-modules/weakrefmethod/default.nix deleted file mode 100644 index 66c0aef2eb9f..000000000000 --- a/pkgs/development/python-modules/weakrefmethod/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, unittest2 }: - -buildPythonPackage rec { - pname = "weakrefmethod"; - version = "1.0.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-N7wfu1V1rPghctTre2/EQS131aHXDf8sH4pFdDAc2mY="; - }; - - checkInputs = [ - unittest2 - ]; - - pythonImportsCheck = [ "weakrefmethod" ]; - - meta = with lib; { - description = "A WeakMethod class for storing bound methods using weak references"; - homepage = "https://github.com/twang817/weakrefmethod"; - license = licenses.psfl; - maintainers = with maintainers; [ myaats ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 922692ef1ef8..d1dce8ee80a4 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -216,6 +216,7 @@ mapAliases ({ types-paramiko = throw "types-paramiko has been removed because it was unused."; # added 2022-05-30 Wand = wand; # added 2022-11-13 WazeRouteCalculator = wazeroutecalculator; # added 2021-09-29 + weakrefmethod = throw "weakrefmethod was removed since it's not needed in Python >= 3.4"; # added 2022-12-01 webapp2 = throw "webapp2 is unmaintained since 2012"; # added 2022-05-29 websocket_client = websocket-client; # added 2021-06-15 xenomapper = throw "xenomapper was moved to pkgs.xenomapper"; # added 2021-12-31 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a3f626314490..6867cab1cbf5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11893,8 +11893,6 @@ self: super: with self; { wcwidth = callPackage ../development/python-modules/wcwidth { }; - weakrefmethod = callPackage ../development/python-modules/weakrefmethod { }; - weasyprint = callPackage ../development/python-modules/weasyprint { }; web3 = callPackage ../development/python-modules/web3 { };