diff options
| author | Fabian Affolter <fabian@affolter-engineering.ch> | 2022-08-23 10:06:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 10:06:00 +0200 |
| commit | 4d225e0b67421175fb7e3b2bbf886098689b1430 (patch) | |
| tree | 8a0e67330bf095e4e05b565ffa0d1bd8e6715d83 /pkgs/development/python-modules/python-barcode | |
| parent | 19c8149641c98c513ed5aec68f9fbd24621df278 (diff) | |
| parent | 279e8eaf51de6dd3ce1e2b2ed50d48ef07cda212 (diff) | |
Merge branch 'master' into ripe-atlas-sagan
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 ]; + }; +} |
