Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / holidays / default.nix
blob164a9b869e820b143917719d96794eb251ccbcfb
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
6 # build-system
7 , setuptools
9 # l10n
10 , polib
11 , lingua
12 , chameleon
14 # dependencies
15 , python-dateutil
17 # tests
18 , importlib-metadata
19 , pytestCheckHook
22 buildPythonPackage rec {
23   pname = "holidays";
24   version = "0.36";
25   pyproject = true;
27   disabled = pythonOlder "3.8";
29   src = fetchFromGitHub {
30     owner = "dr-prodigy";
31     repo = "python-holidays";
32     rev = "refs/tags/v${version}";
33     hash = "sha256-pYlirojeHi10kUcjcvpfBYpIzbYmIlFgOLfy7WRhACU=";
34   };
36   nativeBuildInputs = [
37     setuptools
39     # l10n
40     lingua
41     chameleon
42     polib
43   ];
45   postPatch = ''
46     patchShebangs scripts/l10n/*.py
47   '';
49   preBuild = ''
50     # make l10n
51     ./scripts/l10n/generate_po_files.py
52     ./scripts/l10n/generate_mo_files.py
53   '';
55   propagatedBuildInputs = [
56     python-dateutil
57   ];
59   doCheck = false;
61   nativeCheckInputs = [
62     importlib-metadata
63     polib
64     pytestCheckHook
65   ];
67   pythonImportsCheck = [
68     "holidays"
69   ];
71   disabledTests = [
72     # Failure starting with 0.24
73     "test_l10n"
74   ];
76   meta = with lib; {
77     description = "Generate and work with holidays in Python";
78     homepage = "https://github.com/dr-prodigy/python-holidays";
79     changelog = "https://github.com/dr-prodigy/python-holidays/releases/tag/v${version}";
80     license = licenses.mit;
81     maintainers = with maintainers; [ fab jluttine ];
82   };