biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / schwifty / default.nix
blob793627bb3c613144057c33e7e1404ed124032d69
2   lib,
3   buildPythonPackage,
4   fetchPypi,
6   # build-system
7   hatchling,
8   hatch-vcs,
10   # dependencies
11   importlib-resources,
12   iso3166,
13   pycountry,
14   rstr,
16   # optional-dependencies
17   pydantic,
19   # tests
20   pytestCheckHook,
21   pytest-cov,
22   pythonOlder,
25 buildPythonPackage rec {
26   pname = "schwifty";
27   version = "2024.8.1";
28   pyproject = true;
30   disabled = pythonOlder "3.8";
32   src = fetchPypi {
33     inherit pname version;
34     hash = "sha256-XWdB0yGYKxz2PJVNbXpNnsG/SaF3ysZn8JjrDn/rZ7w=";
35   };
37   build-system = [
38     hatchling
39     hatch-vcs
40   ];
42   dependencies = [
43     iso3166
44     pycountry
45     rstr
46   ] ++ lib.optionals (pythonOlder "3.12") [ importlib-resources ];
48   optional-dependencies = {
49     pydantic = [ pydantic ];
50   };
52   nativeCheckInputs = [
53     pytest-cov
54     pytestCheckHook
55   ] ++ lib.flatten (lib.attrValues optional-dependencies);
57   pythonImportsCheck = [ "schwifty" ];
59   meta = with lib; {
60     changelog = "https://github.com/mdomke/schwifty/blob/${version}/CHANGELOG.rst";
61     description = "Validate/generate IBANs and BICs";
62     homepage = "https://github.com/mdomke/schwifty";
63     license = licenses.mit;
64     maintainers = with maintainers; [ milibopp ];
65   };