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";
|
|
|
|
version = "0.7";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-20 23:08:51 +00:00
|
|
|
owner = "ics-py";
|
|
|
|
repo = "ics-py";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0rrdc9rcxc3ys6rml81b8m8qdlisk78a34bdib0wy65hlkmyyykn";
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
|
|
|
tatsu
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|