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-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-05-15 15:35:15 +00:00
|
|
|
version = "2024.4.0";
|
|
|
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-1EV2oi2LBcjw2U7nKqdVUVDlFCzR8RqX5tVIciw1trg=";
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
iso3166
|
|
|
|
pycountry
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru.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-01-13 08:15:51 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.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 ];
|
|
|
|
};
|
|
|
|
}
|