1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, python-dateutil
6, typing-extensions
7, pytestCheckHook
8, pytest-mock
9, pytz
10, simplejson
11}:
12
13buildPythonPackage rec {
14 pname = "arrow";
15 version = "1.2.3";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-OTSzDKG58pI3bZ2xWxlEYIjRLsWGKbw/DaKP1V+2M6E=";
22 };
23
24 postPatch = ''
25 # no coverage reports
26 sed -i "/addopts/d" tox.ini
27 '';
28
29 propagatedBuildInputs = [ python-dateutil ]
30 ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-mock
35 pytz
36 simplejson
37 ];
38
39 # ParserError: Could not parse timezone expression "America/Nuuk"
40 disabledTests = [
41 "test_parse_tz_name_zzz"
42 ];
43
44 pythonImportsCheck = [ "arrow" ];
45
46 meta = with lib; {
47 description = "Python library for date manipulation";
48 homepage = "https://github.com/crsmithdev/arrow";
49 license = licenses.asl20;
50 maintainers = with maintainers; [ thoughtpolice ];
51 };
52}