depot/third_party/nixpkgs/pkgs/development/python-modules/schwifty/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

66 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
# build-system
, hatchling
, hatch-vcs
# dependencies
, iso3166
, pycountry
# optional-dependencies
, pydantic
# tests
, pytestCheckHook
, pytest-cov
, pythonOlder
}:
buildPythonPackage rec {
pname = "schwifty";
version = "2023.11.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-lyyAx8VDIRO72xW64gjcsZw2C31hV3YCLIGSmdlIJeI=";
};
nativeBuildInputs = [
hatchling
hatch-vcs
];
propagatedBuildInputs = [
iso3166
pycountry
];
passthru.optional-dependencies = {
pydantic = [
pydantic
];
};
nativeCheckInputs = [
pytest-cov
pytestCheckHook
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"schwifty"
];
meta = with lib; {
changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst";
description = "Validate/generate IBANs and BICs";
homepage = "https://github.com/mdomke/schwifty";
license = licenses.mit;
maintainers = with maintainers; [ milibopp ];
};
}