1{ lib
2, buildPythonPackage
3, fetchPypi
4, hypothesis
5, pythonOlder
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "pyisbn";
11 version = "1.3.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "06fm9rn31cb4b61hzy63cnwfjpppgyy517k8a04gzcv9g60n7xbh";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.cfg \
23 --replace "--cov pyisbn --cov-report term-missing --no-cov-on-fail" ""
24 '';
25
26 nativeCheckInputs = [
27 hypothesis
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [
32 "pyisbn"
33 ];
34
35 meta = with lib; {
36 description = "Python module for working with 10- and 13-digit ISBNs";
37 homepage = "https://github.com/JNRowe/pyisbn";
38 license = licenses.gpl3Plus;
39 maintainers = with maintainers; [ eigengrau ];
40 };
41}