2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools-scm,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-barcode";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.15.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-Oxgl+9sR5ZdGbf9ChrTqmx6GpXcXtZ5WOuZ5cm/IVN4=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ setuptools-scm ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
images = [ pillow ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=barcode" "" \
|
|
|
|
--replace "--cov-report=term-missing:skip-covered" "" \
|
|
|
|
--replace "--no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.images;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "barcode" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Create standard barcodes with Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "python-barcode";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/WhyNotHugo/python-barcode";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/WhyNotHugo/python-barcode/blob/v${version}/docs/changelog.rst";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
|
|
};
|
|
|
|
}
|