2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitHub
|
2021-04-08 16:26:57 +00:00
|
|
|
, pythonOlder
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# l10n
|
|
|
|
, polib
|
|
|
|
, lingua
|
|
|
|
, chameleon
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, python-dateutil
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, importlib-metadata
|
|
|
|
, pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "holidays";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.43";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "vacanza";
|
2023-03-04 12:14:45 +00:00
|
|
|
repo = "python-holidays";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-8Qm8hzGVkaYLwqUcqUxcY4iDR1jrhnSoBS8E2Wewb+U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
|
|
|
|
# l10n
|
|
|
|
lingua
|
|
|
|
chameleon
|
|
|
|
polib
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts/l10n/*.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# make l10n
|
|
|
|
./scripts/l10n/generate_po_files.py
|
|
|
|
./scripts/l10n/generate_mo_files.py
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
importlib-metadata
|
|
|
|
polib
|
2021-04-08 16:26:57 +00:00
|
|
|
pytestCheckHook
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"holidays"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Failure starting with 0.24
|
|
|
|
"test_l10n"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generate and work with holidays in Python";
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://github.com/vacanza/python-holidays";
|
|
|
|
changelog = "https://github.com/vacanza/python-holidays/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ fab jluttine ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
2023-04-12 12:48:02 +00:00
|
|
|
|