1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-cov-stub,
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 dependencies = [
25 setuptools # needed for 'pkg_resources'
26 ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 pytest-cov-stub
31 ];
32
33 enabledTestPaths = [ "isbnlib/test/" ];
34
35 # All disabled tests require a network connection
36 disabledTests = [
37 "test_cache"
38 "test_editions_any"
39 "test_editions_merge"
40 "test_editions_thingl"
41 "test_editions_wiki"
42 "test_isbn_from_words"
43 "test_desc"
44 "test_cover"
45 ];
46
47 disabledTestPaths = [
48 "isbnlib/test/test_cache_decorator.py"
49 "isbnlib/test/test_goom.py"
50 "isbnlib/test/test_metadata.py"
51 "isbnlib/test/test_openl.py"
52 "isbnlib/test/test_rename.py"
53 "isbnlib/test/test_webservice.py"
54 "isbnlib/test/test_wiki.py"
55 "isbnlib/test/test_words.py"
56 ];
57
58 pythonImportsCheck = [
59 "isbnlib"
60 "isbnlib.config"
61 "isbnlib.dev"
62 "isbnlib.dev.helpers"
63 "isbnlib.registry"
64 ];
65
66 meta = with lib; {
67 description = "Extract, clean, transform, hyphenate and metadata for ISBNs";
68 homepage = "https://github.com/xlcnd/isbnlib";
69 changelog = "https://github.com/xlcnd/isbnlib/blob/v${version}/CHANGES.txt";
70 license = licenses.lgpl3Plus;
71 maintainers = with maintainers; [ dotlambda ];
72 };
73}