depot/third_party/nixpkgs/pkgs/development/python-modules/python-stdnum/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

45 lines
1,015 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
pythonOlder,
setuptools,
zeep,
}:
buildPythonPackage rec {
pname = "python-stdnum";
version = "1.20";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-rSos8usCXeQIIQI182tK4xJS3jGGJAzKqBJuEXy4JpA=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail " --cov=stdnum --cov-report=term-missing:skip-covered --cov-report=html" ""
'';
nativeBuildInputs = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
optional-dependencies = {
SOAP = [ zeep ];
};
pythonImportsCheck = [ "stdnum" ];
meta = with lib; {
description = "Python module to handle standardized numbers and codes";
homepage = "https://arthurdejong.org/python-stdnum/";
changelog = "https://github.com/arthurdejong/python-stdnum/blob/${version}/ChangeLog";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ johbo ];
};
}