From 322a82a0ad79fa80bf12dde39ddde6226363fe5e Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Thu, 21 Apr 2022 18:22:25 -0600 Subject: [PATCH] python310Packages.python-barcode: init at 0.13.1 --- .../python-modules/python-barcode/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/python-barcode/default.nix 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..7a586c2caed2 --- /dev/null +++ b/pkgs/development/python-modules/python-barcode/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, setuptools-scm +, imagesSupport ? false +, pillow +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-barcode"; + version = "0.13.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-+vukqiTp2Wl3e+UhwpT/GPbCs2rWO1/C8hCNly4jslI="; + }; + + propagatedBuildInputs = [ + setuptools-scm + ] ++ lib.optionals (imagesSupport) [ + pillow + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov=barcode" "" \ + --replace "--cov-report=term-missing:skip-covered" "" \ + --replace "--no-cov-on-fail" "" + ''; + + checkInputs = [ + pytestCheckHook + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e0b07a3274a9..ff67f1719779 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8139,6 +8139,8 @@ in { python-axolotl-curve25519 = callPackage ../development/python-modules/python-axolotl-curve25519 { }; + python-barcode = callPackage ../development/python-modules/python-barcode { }; + python-baseconv = callPackage ../development/python-modules/python-baseconv { }; python-benedict = callPackage ../development/python-modules/python-benedict { };