From eb35be717f3f15f6292034b26a56ca9df0f9696f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 10 Aug 2021 11:26:43 +0200 Subject: [PATCH 1/2] python3Packages.class-registry: 2.1.2 -> 3.0.5 --- .../python-modules/class-registry/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/class-registry/default.nix b/pkgs/development/python-modules/class-registry/default.nix index 3faf07966d09..73e5f21790a3 100644 --- a/pkgs/development/python-modules/class-registry/default.nix +++ b/pkgs/development/python-modules/class-registry/default.nix @@ -1,6 +1,6 @@ { buildPythonPackage, - fetchPypi, + fetchFromGitHub, lib, nose, six, @@ -10,11 +10,13 @@ buildPythonPackage rec { pname = "class-registry"; - version = "2.1.2"; + version = "3.0.5"; - src = fetchPypi { - inherit pname version; - sha256 = "0zjf9nczl1ifzj07bgs6mwxsfd5xck9l0lchv2j0fv2n481xp2v7"; + src = fetchFromGitHub { + owner = "todofixthis"; + repo = pname; + rev = version; + sha256 = "0gpvq4a6qrr2iki6b4vxarjr1jrsw560m2qzm5bb43ix8c8b7y3q"; }; propagatedBuildInputs = [ six ] ++ lib.optional isPy27 typing; From e45dd4bffe1ddd8320c1b0ef59c0d80277348f8d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 10 Aug 2021 11:29:33 +0200 Subject: [PATCH 2/2] python3Packages.class-registry: enable tests --- .../python-modules/class-registry/default.nix | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/class-registry/default.nix b/pkgs/development/python-modules/class-registry/default.nix index 73e5f21790a3..1accefe5f1e5 100644 --- a/pkgs/development/python-modules/class-registry/default.nix +++ b/pkgs/development/python-modules/class-registry/default.nix @@ -1,16 +1,14 @@ -{ - buildPythonPackage, - fetchFromGitHub, - lib, - nose, - six, - typing ? null, - isPy27, +{ lib +, buildPythonPackage +, fetchFromGitHub +, nose +, pythonOlder }: buildPythonPackage rec { pname = "class-registry"; version = "3.0.5"; + disabled = pythonOlder "3.5"; src = fetchFromGitHub { owner = "todofixthis"; @@ -19,16 +17,16 @@ buildPythonPackage rec { sha256 = "0gpvq4a6qrr2iki6b4vxarjr1jrsw560m2qzm5bb43ix8c8b7y3q"; }; - propagatedBuildInputs = [ six ] ++ lib.optional isPy27 typing; - checkInputs = [ nose ]; + checkInputs = [ + nose + ]; - # Tests currently failing. - doCheck = false; + pythonImportsCheck = [ "class_registry" ]; - meta = { - description = "Factory+Registry pattern for Python classes."; + meta = with lib; { + description = "Factory and registry pattern for Python classes"; homepage = "https://class-registry.readthedocs.io/en/latest/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kevincox ]; + license = licenses.mit; + maintainers = with maintainers; [ kevincox ]; }; }