1{
2 lib,
3 buildPythonPackage,
4 chameleon,
5 fetchFromGitHub,
6 importlib-metadata,
7 lingva,
8 polib,
9 pytestCheckHook,
10 python-dateutil,
11 pythonOlder,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "holidays";
17 version = "0.81";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "vacanza";
24 repo = "python-holidays";
25 tag = "v${version}";
26 hash = "sha256-p1+/BRi/4QG524nT9lns1AGc6jeO9KTJNJ2rljkrmko=";
27 };
28
29 build-system = [
30 setuptools
31
32 # l10n
33 lingva
34 chameleon
35 polib
36 ];
37
38 postPatch = ''
39 patchShebangs scripts/l10n/*.py
40 '';
41
42 preBuild = ''
43 # make l10n
44 ./scripts/l10n/generate_po_files.py
45 ./scripts/l10n/generate_mo_files.py
46 '';
47
48 dependencies = [ python-dateutil ];
49
50 doCheck = false;
51
52 nativeCheckInputs = [
53 importlib-metadata
54 polib
55 pytestCheckHook
56 ];
57
58 pythonImportsCheck = [ "holidays" ];
59
60 meta = with lib; {
61 description = "Generate and work with holidays in Python";
62 homepage = "https://github.com/vacanza/python-holidays";
63 changelog = "https://github.com/vacanza/python-holidays/releases/tag/${src.tag}";
64 license = licenses.mit;
65 maintainers = with maintainers; [
66 fab
67 jluttine
68 ];
69 };
70}