From 0860e7ef3b79513d4391d8385258c7b55cd9b6f4 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 00:42:30 -0400 Subject: [PATCH 1/2] python312Packages.isbnlib: drop nose dependency --- .../python-modules/isbnlib/default.nix | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index 520b7f615978..b94f9439f732 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -1,9 +1,9 @@ { lib, buildPythonPackage, - fetchPypi, - nose, - coverage, + fetchFromGitHub, + pytestCheckHook, + pytest-cov, pythonOlder, }: @@ -14,18 +14,42 @@ buildPythonPackage rec { disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-lvkIZMd7AfVfoR5b/Kn9kJUB2YQvO8cQ1Oq4UZXZBTk="; + src = fetchFromGitHub { + owner = "xlcnd"; + repo = "isbnlib"; + rev = "v${version}"; + hash = "sha256-d6p0wv7kj+NOZJRE2rzQgb7PXv+E3tASIibYCjzCdx8="; }; nativeCheckInputs = [ - nose - coverage + pytestCheckHook + pytest-cov ]; - # requires network connection - doCheck = false; + pytestFlagsArray = [ "isbnlib/test/" ]; + + # All disabled tests require a network connection + disabledTests = [ + "test_cache" + "test_editions_any" + "test_editions_merge" + "test_editions_thingl" + "test_editions_wiki" + "test_isbn_from_words" + "test_desc" + "test_cover" + ]; + + disabledTestPaths = [ + "isbnlib/test/test_cache_decorator.py" + "isbnlib/test/test_goom.py" + "isbnlib/test/test_metadata.py" + "isbnlib/test/test_openl.py" + "isbnlib/test/test_rename.py" + "isbnlib/test/test_webservice.py" + "isbnlib/test/test_wiki.py" + "isbnlib/test/test_words.py" + ]; pythonImportsCheck = [ "isbnlib" From d554eb04425a296ab957bb445250e6e3ebe1bc95 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 00:43:10 -0400 Subject: [PATCH 2/2] python312Packages.isbnlib: modernize --- pkgs/development/python-modules/isbnlib/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index b94f9439f732..8bf7e67b9ecd 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -4,15 +4,13 @@ fetchFromGitHub, pytestCheckHook, pytest-cov, - pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "isbnlib"; version = "3.10.14"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { owner = "xlcnd"; @@ -21,6 +19,8 @@ buildPythonPackage rec { hash = "sha256-d6p0wv7kj+NOZJRE2rzQgb7PXv+E3tASIibYCjzCdx8="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ pytestCheckHook pytest-cov