1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-cov,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "isbnlib";
12 version = "3.10.14";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "xlcnd";
17 repo = "isbnlib";
18 rev = "v${version}";
19 hash = "sha256-d6p0wv7kj+NOZJRE2rzQgb7PXv+E3tASIibYCjzCdx8=";
20 };
21
22 build-system = [ setuptools ];
23
24 nativeCheckInputs = [
25 pytestCheckHook
26 pytest-cov
27 ];
28
29 pytestFlagsArray = [ "isbnlib/test/" ];
30
31 # All disabled tests require a network connection
32 disabledTests = [
33 "test_cache"
34 "test_editions_any"
35 "test_editions_merge"
36 "test_editions_thingl"
37 "test_editions_wiki"
38 "test_isbn_from_words"
39 "test_desc"
40 "test_cover"
41 ];
42
43 disabledTestPaths = [
44 "isbnlib/test/test_cache_decorator.py"
45 "isbnlib/test/test_goom.py"
46 "isbnlib/test/test_metadata.py"
47 "isbnlib/test/test_openl.py"
48 "isbnlib/test/test_rename.py"
49 "isbnlib/test/test_webservice.py"
50 "isbnlib/test/test_wiki.py"
51 "isbnlib/test/test_words.py"
52 ];
53
54 pythonImportsCheck = [
55 "isbnlib"
56 "isbnlib.config"
57 "isbnlib.dev"
58 "isbnlib.dev.helpers"
59 "isbnlib.registry"
60 ];
61
62 meta = with lib; {
63 description = "Extract, clean, transform, hyphenate and metadata for ISBNs";
64 homepage = "https://github.com/xlcnd/isbnlib";
65 changelog = "https://github.com/xlcnd/isbnlib/blob/v${version}/CHANGES.txt";
66 license = licenses.lgpl3Plus;
67 maintainers = with maintainers; [ dotlambda ];
68 };
69}