2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mock
|
2023-04-29 16:46:19 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "schedule";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.2.1";
|
2023-04-29 16:46:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-hDvAU4uZyT8CuLUOPjmIbAby0AOyT0jhqkyt+j80Enk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildInputs = [
|
|
|
|
mock
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
preCheck = ''
|
|
|
|
# https://github.com/dbader/schedule/issues/488
|
|
|
|
substituteInPlace test_schedule.py --replace \
|
|
|
|
"self.assertRaises(ScheduleValueError, every().day.until, datetime.time(hour=5))" \
|
|
|
|
"# self.assertRaises(ScheduleValueError, every().day.until, datetime.time(hour=5))"
|
|
|
|
'';
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"schedule"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python job scheduling for humans";
|
|
|
|
homepage = "https://github.com/dbader/schedule";
|
2023-04-29 16:46:19 +00:00
|
|
|
changelog = "https://github.com/dbader/schedule/blob/${version}/HISTORY.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|