2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, convertdate
|
|
|
|
, dateutil
|
2021-02-05 17:12:51 +00:00
|
|
|
, hijri-converter
|
2020-09-25 04:45:31 +00:00
|
|
|
, korean-lunar-calendar
|
|
|
|
, six
|
2021-02-05 17:12:51 +00:00
|
|
|
, python
|
|
|
|
, flake8
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "holidays";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "0.10.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "0g4hqbb94cwxlcwsjzrzxzlann1ks2r4mgnfzqz74a2rg1nih5zd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +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-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
convertdate
|
|
|
|
dateutil
|
2021-02-05 17:12:51 +00:00
|
|
|
hijri-converter
|
2020-09-25 04:45:31 +00:00
|
|
|
korean-lunar-calendar
|
|
|
|
six
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
flake8
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "holidays" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/dr-prodigy/python-holidays";
|
|
|
|
description = "Generate and work with holidays in Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|