diff options
| author | Robert Hensing <robert@roberthensing.nl> | 2022-12-02 18:12:14 +0000 |
|---|---|---|
| committer | Robert Hensing <robert@roberthensing.nl> | 2022-12-02 18:12:14 +0000 |
| commit | 7bfbf037d7fea8edca0ef75edd15ce4534052c5c (patch) | |
| tree | 114669c9b210ea663710cd403350a43288b60e51 /pkgs/development/python-modules/python-barcode | |
| parent | 4e502a1c4d207610b0964b92bb41e574ed62e9c9 (diff) | |
| parent | fad052f056576d04a8eb7a6b374584a740e10706 (diff) | |
Merge remote-tracking branch 'upstream/master' into allow-configuration-of-roles
Diffstat (limited to 'pkgs/development/python-modules/python-barcode')
| -rw-r--r-- | pkgs/development/python-modules/python-barcode/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-barcode/default.nix b/pkgs/development/python-modules/python-barcode/default.nix new file mode 100644 index 000000000000..5d64f933b691 --- /dev/null +++ b/pkgs/development/python-modules/python-barcode/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools-scm +, pillow +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-barcode"; + version = "0.14.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-JBs0qlxctqmImIL5QJsBgpA6LF0ZtCGL42Cc271f/fk="; + }; + + propagatedBuildInputs = [ + setuptools-scm + ]; + + passthru.optional-dependencies = { + images = [ + pillow + ]; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=barcode" "" \ + --replace "--cov-report=term-missing:skip-covered" "" \ + --replace "--no-cov-on-fail" "" + ''; + + checkInputs = [ + pytestCheckHook + ] ++ passthru.optional-dependencies.images; + + pythonImportsCheck = [ "barcode" ]; + + meta = with lib; { + description = "Create standard barcodes with Python"; + homepage = "https://github.com/WhyNotHugo/python-barcode"; + license = licenses.mit; + maintainers = with maintainers; [ wolfangaukang ]; + }; +} |
