2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
importlib-resources,
|
|
|
|
iso3166,
|
|
|
|
pycountry,
|
2024-07-27 06:49:29 +00:00
|
|
|
rstr,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optional-dependencies
|
|
|
|
pydantic,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-cov,
|
|
|
|
pythonOlder,
|
2022-06-26 10:26:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "schwifty";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2024.8.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-XWdB0yGYKxz2PJVNbXpNnsG/SaF3ysZn8JjrDn/rZ7w=";
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [
|
2024-01-13 08:15:51 +00:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2022-06-26 10:26:21 +00:00
|
|
|
iso3166
|
|
|
|
pycountry
|
2024-07-27 06:49:29 +00:00
|
|
|
rstr
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
pydantic = [ pydantic ];
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
2024-07-27 06:49:29 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "schwifty" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst";
|
2022-06-26 10:26:21 +00:00
|
|
|
description = "Validate/generate IBANs and BICs";
|
|
|
|
homepage = "https://github.com/mdomke/schwifty";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ milibopp ];
|
|
|
|
};
|
|
|
|
}
|