ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / time-machine / default.nix
blob44335c7248b92fbb4993dc3ca2df480cb15cb4cc
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonAtLeast
5 , pythonOlder
6 , backports-zoneinfo
7 , python-dateutil
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "time-machine";
13   version = "2.8.2";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "adamchainz";
20     repo = pname;
21     rev = version;
22     sha256 = "sha256-EFlvO9QlOP351kZAFQ+hwghL+7m+Cin/OyLV3NX+y8E=";
23   };
25   propagatedBuildInputs = [
26     python-dateutil
27   ] ++ lib.optionals (pythonOlder "3.9") [
28     backports-zoneinfo
29   ];
31   checkInputs = [
32     pytestCheckHook
33   ];
35   disabledTests = lib.optionals (pythonAtLeast "3.9") [
36     # Assertion Errors related to Africa/Addis_Ababa
37     "test_destination_datetime_tzinfo_zoneinfo_nested"
38     "test_destination_datetime_tzinfo_zoneinfo_no_orig_tz"
39     "test_destination_datetime_tzinfo_zoneinfo"
40     "test_move_to_datetime_with_tzinfo_zoneinfo"
41   ];
43   pythonImportsCheck = [
44     "time_machine"
45   ];
47   meta = with lib; {
48     description = "Travel through time in your tests";
49     homepage = "https://github.com/adamchainz/time-machine";
50     license = licenses.mit;
51     maintainers = with maintainers; [ fab ];
52   };