Merge pull request #330773 from pyrox0/denose/isbnlib

python312Packages.isbnlib: drop nose dependency; modernize
This commit is contained in:
Emily 2024-07-29 12:54:07 +01:00 committed by GitHub
commit d3a7ab355f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"