nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 49 lines 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonAtLeast 5, pythonOlder 6, backports-zoneinfo 7, python-dateutil 8, tzdata 9, hypothesis 10, pytestCheckHook 11, pytz 12}: 13 14buildPythonPackage rec { 15 pname = "pytz-deprecation-shim"; 16 version = "0.1.0.post0"; 17 18 format = "pyproject"; 19 20 src = fetchPypi { 21 pname = "pytz_deprecation_shim"; 22 inherit version; 23 sha256 = "af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d"; 24 }; 25 26 propagatedBuildInputs = (lib.optionals (pythonAtLeast "3.6" && pythonOlder "3.9") [ 27 backports-zoneinfo 28 ]) ++ (lib.optionals (pythonOlder "3.6") [ 29 python-dateutil 30 ]) ++ (lib.optionals (pythonAtLeast "3.6") [ 31 tzdata 32 ]); 33 34 checkInputs = [ 35 hypothesis 36 pytestCheckHook 37 pytz 38 ]; 39 40 # https://github.com/pganssle/pytz-deprecation-shim/issues/27 41 doCheck = pythonAtLeast "3.9"; 42 43 meta = with lib; { 44 description = "Shims to make deprecation of pytz easier"; 45 homepage = "https://github.com/pganssle/pytz-deprecation-shim"; 46 license = licenses.asl20; 47 maintainers = with maintainers; [ dotlambda ]; 48 }; 49}