2021-05-12 09:24:16 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, tatsu
|
|
|
|
, arrow
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-flakes
|
2019-09-14 17:42:11 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ics";
|
2020-02-29 21:43:15 +01:00
|
|
|
version = "0.7";
|
2019-12-16 05:27:52 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2019-09-14 17:42:11 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-12 09:24:16 +02:00
|
|
|
owner = "ics-py";
|
|
|
|
repo = "ics-py";
|
2019-09-14 17:42:11 +02:00
|
|
|
rev = "v${version}";
|
2020-02-29 21:43:15 +01:00
|
|
|
sha256 = "0rrdc9rcxc3ys6rml81b8m8qdlisk78a34bdib0wy65hlkmyyykn";
|
2019-09-14 17:42:11 +02:00
|
|
|
};
|
|
|
|
|
2021-05-12 09:24:16 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
|
|
|
tatsu
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-flakes
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2019-09-14 17:42:11 +02:00
|
|
|
|
2019-12-16 05:27:52 +01:00
|
|
|
postPatch = ''
|
2021-05-12 09:24:16 +02:00
|
|
|
# 0.8 will move to python-dateutil
|
2019-12-16 05:27:52 +01:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "arrow>=0.11,<0.15" "arrow"
|
2020-12-11 15:20:47 +01:00
|
|
|
substituteInPlace setup.cfg --replace "--pep8" ""
|
2019-12-16 05:27:52 +01:00
|
|
|
'';
|
|
|
|
|
2021-05-12 09:24:16 +02:00
|
|
|
disabledTests = [
|
|
|
|
# Failure seems to be related to arrow > 1.0
|
|
|
|
"test_event"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ics" ];
|
2019-09-14 17:42:11 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-09-14 17:42:11 +02: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-12 09:24:16 +02:00
|
|
|
changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}";
|
2019-09-14 17:42:11 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|