From 322a82a0ad79fa80bf12dde39ddde6226363fe5e Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Thu, 21 Apr 2022 18:22:25 -0600 Subject: python310Packages.python-barcode: init at 0.13.1 --- .../python-modules/python-barcode/default.nix | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/python-barcode/default.nix (limited to 'pkgs/development/python-modules/python-barcode') 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 ]; + }; +} -- cgit v1.2.3 From 7c9b6ae465e5d7cdccb9ea1c433d12e2125b4611 Mon Sep 17 00:00:00 2001 From: "P. R. d. O" Date: Sat, 21 May 2022 11:07:34 -0600 Subject: python3Packages.python-barcode: 0.13.1 -> 0.14.0 --- .../development/python-modules/python-barcode/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'pkgs/development/python-modules/python-barcode') diff --git a/pkgs/development/python-modules/python-barcode/default.nix b/pkgs/development/python-modules/python-barcode/default.nix index 7a586c2caed2..165cb5cc5d27 100644 --- a/pkgs/development/python-modules/python-barcode/default.nix +++ b/pkgs/development/python-modules/python-barcode/default.nix @@ -3,29 +3,32 @@ , fetchPypi , pythonOlder , setuptools-scm -, imagesSupport ? false , pillow , pytestCheckHook }: buildPythonPackage rec { pname = "python-barcode"; - version = "0.13.1"; + version = "0.14.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-+vukqiTp2Wl3e+UhwpT/GPbCs2rWO1/C8hCNly4jslI="; + sha256 = "sha256-JBs0qlxctqmImIL5QJsBgpA6LF0ZtCGL42Cc271f/fk="; }; propagatedBuildInputs = [ setuptools-scm - ] ++ lib.optionals (imagesSupport) [ - pillow ]; + passthru.extras-require = { + images = [ + pillow + ]; + }; + postPatch = '' substituteInPlace setup.cfg \ --replace "--cov=barcode" "" \ @@ -35,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ]; + ] ++ passthru.extras-require.images; pythonImportsCheck = [ "barcode" ]; -- cgit v1.2.3 From 272430c82399d0a2f22b51dd0e564a8709ba6782 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 22 May 2022 16:26:11 +0200 Subject: treewide: migrate python packages to optional-dependencies This follows the term used by PEP 621. --- pkgs/development/python-modules/python-barcode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/python-modules/python-barcode') diff --git a/pkgs/development/python-modules/python-barcode/default.nix b/pkgs/development/python-modules/python-barcode/default.nix index 165cb5cc5d27..5d64f933b691 100644 --- a/pkgs/development/python-modules/python-barcode/default.nix +++ b/pkgs/development/python-modules/python-barcode/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { setuptools-scm ]; - passthru.extras-require = { + passthru.optional-dependencies = { images = [ pillow ]; @@ -38,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - ] ++ passthru.extras-require.images; + ] ++ passthru.optional-dependencies.images; pythonImportsCheck = [ "barcode" ]; -- cgit v1.2.3