2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-02-02 18:25:31 +00:00
|
|
|
, zeep
|
2022-11-04 12:27:35 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-stdnum";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.19";
|
2022-11-04 12:27:35 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-Ez7IL1Y5DqdMGQVp6Y8vsUuGmAix1UeFcI8i0P6tiz8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov=stdnum --cov-report=term-missing:skip-covered --cov-report=html" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
SOAP = [
|
|
|
|
zeep
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"stdnum"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python module to handle standardized numbers and codes";
|
2022-11-04 12:27:35 +00:00
|
|
|
homepage = "https://arthurdejong.org/python-stdnum/";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/arthurdejong/python-stdnum/blob/${version}/ChangeLog";
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ johbo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|