1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 setuptools-scm,
7 pillow,
8 pytestCheckHook,
9 pytest-cov-stub,
10}:
11
12buildPythonPackage rec {
13 pname = "python-barcode";
14 version = "0.15.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-Oxgl+9sR5ZdGbf9ChrTqmx6GpXcXtZ5WOuZ5cm/IVN4=";
22 };
23
24 propagatedBuildInputs = [ setuptools-scm ];
25
26 optional-dependencies = {
27 images = [ pillow ];
28 };
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 pytest-cov-stub
33 ]
34 ++ optional-dependencies.images;
35
36 pythonImportsCheck = [ "barcode" ];
37
38 meta = with lib; {
39 description = "Create standard barcodes with Python";
40 mainProgram = "python-barcode";
41 homepage = "https://github.com/WhyNotHugo/python-barcode";
42 changelog = "https://github.com/WhyNotHugo/python-barcode/blob/v${version}/docs/changelog.rst";
43 license = licenses.mit;
44 maintainers = [ ];
45 };
46}