mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 05:23:54 +00:00
python3Packages.time-machine: init at 2.3.1
This commit is contained in:
parent
c4a39df4a8
commit
bde91debf3
50
pkgs/development/python-modules/time-machine/default.nix
Normal file
50
pkgs/development/python-modules/time-machine/default.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
, backports-zoneinfo
|
||||
, python-dateutil
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "time-machine";
|
||||
version = "2.3.1";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adamchainz";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1flim8xaa7qglh2b39cf57i8g0kg0707pw3mdkrgh0xjn27bv9bi";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-dateutil
|
||||
#] ++ lib.optionals (pythonOlder "3.9") [
|
||||
backports-zoneinfo
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.9") [
|
||||
# Assertion Errors related to Africa/Addis_Ababa
|
||||
"test_destination_datetime_tzinfo_zoneinfo"
|
||||
"test_destination_datetime_tzinfo_zoneinfo_nested"
|
||||
"test_move_to_datetime_with_tzinfo_zoneinfo"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"time_machine"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Travel through time in your tests";
|
||||
homepage = "https://github.com/adamchainz/time-machine";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -8675,6 +8675,8 @@ in {
|
||||
|
||||
timelib = callPackage ../development/python-modules/timelib { };
|
||||
|
||||
time-machine = callPackage ../development/python-modules/time-machine { };
|
||||
|
||||
timeout-decorator = callPackage ../development/python-modules/timeout-decorator { };
|
||||
|
||||
timezonefinder = callPackage ../development/python-modules/timezonefinder { };
|
||||
|
Loading…
Reference in New Issue
Block a user