2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-09-12 14:31:30 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, convertdate
|
|
|
|
, dateutil
|
2021-02-03 22:22:49 +00:00
|
|
|
, hijri-converter
|
2020-09-12 14:31:30 +01:00
|
|
|
, korean-lunar-calendar
|
|
|
|
, six
|
2021-02-03 22:22:49 +00:00
|
|
|
, python
|
|
|
|
, flake8
|
2020-09-12 14:31:30 +01:00
|
|
|
}:
|
2019-10-25 05:57:37 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "holidays";
|
2021-02-03 22:22:49 +00:00
|
|
|
version = "0.10.5.2";
|
2019-10-25 05:57:37 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-03 22:22:49 +00:00
|
|
|
sha256 = "0g4hqbb94cwxlcwsjzrzxzlann1ks2r4mgnfzqz74a2rg1nih5zd";
|
2019-10-25 05:57:37 +01:00
|
|
|
};
|
|
|
|
|
2021-02-03 22:22:49 +00:00
|
|
|
postPatch = ''
|
|
|
|
# ignore too long line issues
|
|
|
|
# https://github.com/dr-prodigy/python-holidays/issues/423
|
|
|
|
substituteInPlace tests.py \
|
|
|
|
--replace "flake8.get_style_guide(ignore=[" "flake8.get_style_guide(ignore=['E501', "
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2020-09-12 14:31:30 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
convertdate
|
|
|
|
dateutil
|
2021-02-03 22:22:49 +00:00
|
|
|
hijri-converter
|
2020-09-12 14:31:30 +01:00
|
|
|
korean-lunar-calendar
|
|
|
|
six
|
|
|
|
];
|
2021-02-03 22:22:49 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
flake8
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest
|
|
|
|
'';
|
|
|
|
|
2020-09-12 14:31:30 +01:00
|
|
|
pythonImportsCheck = [ "holidays" ];
|
2019-10-25 05:57:37 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-09 15:21:26 +00:00
|
|
|
homepage = "https://github.com/dr-prodigy/python-holidays";
|
2019-10-25 05:57:37 +01:00
|
|
|
description = "Generate and work with holidays in Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|