Files
nixpkgs/pkgs/development/python-modules/holidays/default.nix
T
Martin Weinelt 13716aff67 python3Packages.holidays: 0.85 -> 0.89
https://github.com/vacanza/holidays/blob/v0.89/CHANGES.md

This commit was automatically generated using update-python-libraries.
2026-02-01 17:19:16 +01:00

76 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
chameleon,
fetchFromGitHub,
importlib-metadata,
lingva,
numpy,
polib,
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
python-dateutil,
setuptools,
}:
buildPythonPackage rec {
pname = "holidays";
version = "0.89";
pyproject = true;
src = fetchFromGitHub {
owner = "vacanza";
repo = "python-holidays";
tag = "v${version}";
hash = "sha256-g7f0364Xxz+jTjgA8y0nEPbzNalQdMLdwoBZ2odq1W0=";
};
build-system = [
setuptools
# l10n
lingva
chameleon
polib
];
postPatch = ''
patchShebangs scripts/l10n/*.py
# generating l10n files imports holidays before distinfo metadata exists
substituteInPlace holidays/version.py \
--replace-fail 'version("holidays")' '"${version}"'
'';
preBuild = ''
# make l10n
./scripts/l10n/generate_po_files.py
./scripts/l10n/generate_mo_files.py
'';
dependencies = [ python-dateutil ];
nativeCheckInputs = [
importlib-metadata
numpy
polib
pytest-cov-stub
pytest-xdist
pytestCheckHook
];
pythonImportsCheck = [ "holidays" ];
meta = {
description = "Generate and work with holidays in Python";
homepage = "https://github.com/vacanza/python-holidays";
changelog = "https://github.com/vacanza/holidays/blob/${src.tag}/CHANGES.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
fab
jluttine
];
};
}