1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, tatsu
6, arrow
7, pytestCheckHook
8, pytest-flakes
9}:
10
11buildPythonPackage rec {
12 pname = "ics";
13 version = "0.7";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "ics-py";
18 repo = "ics-py";
19 rev = "v${version}";
20 sha256 = "0rrdc9rcxc3ys6rml81b8m8qdlisk78a34bdib0wy65hlkmyyykn";
21 };
22
23 propagatedBuildInputs = [
24 arrow
25 tatsu
26 ];
27
28 checkInputs = [
29 pytest-flakes
30 pytestCheckHook
31 ];
32
33 postPatch = ''
34 # 0.8 will move to python-dateutil
35 substituteInPlace requirements.txt \
36 --replace "arrow>=0.11,<0.15" "arrow"
37 substituteInPlace setup.cfg --replace "--pep8" ""
38 '';
39
40 disabledTests = [
41 # Failure seems to be related to arrow > 1.0
42 "test_event"
43 ];
44
45 pythonImportsCheck = [ "ics" ];
46
47 meta = with lib; {
48 description = "Pythonic and easy iCalendar library (RFC 5545)";
49 longDescription = ''
50 Ics.py is a pythonic and easy iCalendar library. Its goals are to read and
51 write ics data in a developer friendly way.
52 '';
53 homepage = "http://icspy.readthedocs.org/en/stable/";
54 changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ primeos ];
57 };
58}