1{
2 lib,
3 arrow,
4 attrs,
5 buildPythonPackage,
6 fetchFromGitHub,
7 pytest-flakes,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11 tatsu,
12}:
13
14buildPythonPackage rec {
15 pname = "ics";
16 version = "0.7.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "ics-py";
23 repo = "ics-py";
24 tag = "v${version}";
25 hash = "sha256-hdtnET7YfSb85+TGwpwzoxOfxPT7VSj9eKSiV6AXUS8=";
26 };
27
28 postPatch = ''
29 substituteInPlace setup.cfg \
30 --replace-fail "--pep8" ""
31 '';
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 attrs
37 arrow
38 tatsu
39 ];
40
41 nativeCheckInputs = [
42 pytest-flakes
43 pytestCheckHook
44 ];
45
46 disabledTests = [
47 # Failure seems to be related to arrow > 1.0
48 "test_event"
49 # Broke with TatSu 5.7:
50 "test_many_lines"
51 # AssertionError: 'Europe/Berlin' not found in "tzfile('Atlantic/Jan_Mayen')"
52 "test_timezone_not_dropped"
53 ];
54
55 pythonImportsCheck = [ "ics" ];
56
57 meta = with lib; {
58 description = "Pythonic and easy iCalendar library (RFC 5545)";
59 longDescription = ''
60 Ics.py is a pythonic and easy iCalendar library. Its goals are to read and
61 write ics data in a developer friendly way.
62 '';
63 homepage = "http://icspy.readthedocs.org/";
64 changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}";
65 license = licenses.asl20;
66 maintainers = [ ];
67 };
68}