1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 pythonOlder,
6 fetchPypi,
7 setuptools,
8 pytest-mock,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "tzlocal";
14 version = "5.3.1"; # version needs to be compatible with APScheduler
15
16 disabled = pythonOlder "3.8";
17
18 pyproject = true;
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-zO/8ft7O/qH1lVQdvW6ZDLHqPRm/AbKAnzYqA915If0=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [
28 pytest-mock
29 pytestCheckHook
30 ];
31
32 disabledTests = [
33 "test_conflicting"
34 "test_noconflict"
35 "test_symlink_localtime"
36 ]
37 ++ lib.optional stdenv.hostPlatform.isDarwin "test_assert_tz_offset";
38
39 pythonImportsCheck = [ "tzlocal" ];
40
41 meta = with lib; {
42 description = "Tzinfo object for the local timezone";
43 homepage = "https://github.com/regebro/tzlocal";
44 changelog = "https://github.com/regebro/tzlocal/blob/${version}/CHANGES.txt";
45 license = licenses.cddl;
46 maintainers = with maintainers; [ dotlambda ];
47 };
48}