diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index 520b7f615978..8bf7e67b9ecd 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -1,31 +1,55 @@ { lib, buildPythonPackage, - fetchPypi, - nose, - coverage, - pythonOlder, + fetchFromGitHub, + pytestCheckHook, + pytest-cov, + setuptools, }: buildPythonPackage rec { pname = "isbnlib"; version = "3.10.14"; - format = "setuptools"; + pyproject = true; - 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="; }; + build-system = [ setuptools ]; + 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"