2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, tatsu
|
|
|
|
, arrow
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-flakes
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ics";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "0.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 23:08:51 +00:00
|
|
|
owner = "ics-py";
|
|
|
|
repo = "ics-py";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-hdtnET7YfSb85+TGwpwzoxOfxPT7VSj9eKSiV6AXUS8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
|
|
|
tatsu
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytest-flakes
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
# 0.8 will move to python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "arrow>=0.11,<0.15" "arrow"
|
2020-12-25 13:55:36 +00:00
|
|
|
substituteInPlace setup.cfg --replace "--pep8" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Failure seems to be related to arrow > 1.0
|
|
|
|
"test_event"
|
2022-01-19 23:45:15 +00:00
|
|
|
# Broke with TatSu 5.7:
|
|
|
|
"test_many_lines"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ics" ];
|
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
|
|
|
description = "Pythonic and easy iCalendar library (RFC 5545)";
|
|
|
|
longDescription = ''
|
|
|
|
Ics.py is a pythonic and easy iCalendar library. Its goals are to read and
|
|
|
|
write ics data in a developer friendly way.
|
|
|
|
'';
|
|
|
|
homepage = "http://icspy.readthedocs.org/en/stable/";
|
2021-05-20 23:08:51 +00:00
|
|
|
changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|