From db26b5ce1769792951df844b193ee531013cc18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 5 Oct 2021 18:06:28 -0700 Subject: [PATCH] python3Packages.class-registry: make alias of phx-class-registry --- .../python-modules/class-registry/default.nix | 32 ----------------- .../phx-class-registry/default.nix | 36 +++++++++++-------- .../tools/backblaze-b2/default.nix | 1 - pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 5 files changed, 22 insertions(+), 50 deletions(-) delete mode 100644 pkgs/development/python-modules/class-registry/default.nix diff --git a/pkgs/development/python-modules/class-registry/default.nix b/pkgs/development/python-modules/class-registry/default.nix deleted file mode 100644 index 1accefe5f1e5..000000000000 --- a/pkgs/development/python-modules/class-registry/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, nose -, pythonOlder -}: - -buildPythonPackage rec { - pname = "class-registry"; - version = "3.0.5"; - disabled = pythonOlder "3.5"; - - src = fetchFromGitHub { - owner = "todofixthis"; - repo = pname; - rev = version; - sha256 = "0gpvq4a6qrr2iki6b4vxarjr1jrsw560m2qzm5bb43ix8c8b7y3q"; - }; - - checkInputs = [ - nose - ]; - - pythonImportsCheck = [ "class_registry" ]; - - meta = with lib; { - description = "Factory and registry pattern for Python classes"; - homepage = "https://class-registry.readthedocs.io/en/latest/"; - license = licenses.mit; - maintainers = with maintainers; [ kevincox ]; - }; -} diff --git a/pkgs/development/python-modules/phx-class-registry/default.nix b/pkgs/development/python-modules/phx-class-registry/default.nix index 94538dc6e74d..0cb94be921db 100644 --- a/pkgs/development/python-modules/phx-class-registry/default.nix +++ b/pkgs/development/python-modules/phx-class-registry/default.nix @@ -1,28 +1,34 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27, pytestCheckHook }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - pname = "phx-class-registry"; + pname = "class-registry"; version = "3.0.5"; + disabled = pythonOlder "3.5"; - disabled = isPy27; - - src = fetchPypi { - inherit pname version; - sha256 = "14iap8db2ldmnlf5kvxs52aps31rl98kpa5nq8wdm30a86n6457i"; + src = fetchFromGitHub { + owner = "todofixthis"; + repo = pname; + rev = version; + sha256 = "0gpvq4a6qrr2iki6b4vxarjr1jrsw560m2qzm5bb43ix8c8b7y3q"; }; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; - disabledTests = [ - "test_branding" - "test_happy_path" - "test_len" + pythonImportsCheck = [ + "class_registry" ]; meta = with lib; { - description = "Registry pattern for Python classes, with setuptools entry points integration"; - homepage = "https://github.com/todofixthis/class-registry"; + description = "Factory and registry pattern for Python classes"; + homepage = "https://class-registry.readthedocs.io/en/latest/"; license = licenses.mit; - maintainers = with maintainers; [ SuperSandro2000 ]; + maintainers = with maintainers; [ kevincox SuperSandro2000 ]; }; } diff --git a/pkgs/development/tools/backblaze-b2/default.nix b/pkgs/development/tools/backblaze-b2/default.nix index 070546a3ff91..a326f85eac0a 100644 --- a/pkgs/development/tools/backblaze-b2/default.nix +++ b/pkgs/development/tools/backblaze-b2/default.nix @@ -29,7 +29,6 @@ python3Packages.buildPythonApplication rec { propagatedBuildInputs = with python3Packages; [ b2sdk - class-registry phx-class-registry setuptools docutils diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 039b921ee982..ad0b39b27ac6 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -36,6 +36,7 @@ mapAliases ({ blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # Added 2020-11-29 bt_proximity = bt-proximity; # added 2021-07-02 bugseverywhere = throw "bugseverywhere has been removed: Abandoned by upstream."; # Added 2019-11-27 + class-registry = phx-class-registry; # added 2021-10-05 ConfigArgParse = configargparse; # added 2021-03-18 dateutil = python-dateutil; # added 2021-07-03 detox = throw "detox is no longer maintained, and was broken since may 2019"; # added 2020-07-04 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b317230c9a7d..7f370f947312 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1501,8 +1501,6 @@ in { ckcc-protocol = callPackage ../development/python-modules/ckcc-protocol { }; - class-registry = callPackage ../development/python-modules/class-registry { }; - claripy = callPackage ../development/python-modules/claripy { }; cld2-cffi = callPackage ../development/python-modules/cld2-cffi { };