Unverified Commit d3a7ab35 authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #330773 from pyrox0/denose/isbnlib

python312Packages.isbnlib: drop nose dependency; modernize
parents e7730012 d554eb04
Loading
Loading
Loading
Loading
+38 −14
Original line number Diff line number Diff line
{
  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
  ];

  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"
  ];

  # requires network connection
  doCheck = false;
  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"