1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonAtLeast,
6 pythonOlder,
7 python-dateutil,
8 setuptools,
9 tzdata,
10 hypothesis,
11 pytestCheckHook,
12 pytz,
13}:
14
15buildPythonPackage rec {
16 pname = "pytz-deprecation-shim";
17 version = "0.1.0.post0";
18
19 format = "pyproject";
20
21 src = fetchPypi {
22 pname = "pytz_deprecation_shim";
23 inherit version;
24 sha256 = "af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs =
30 (lib.optionals (pythonOlder "3.6") [ python-dateutil ])
31 ++ (lib.optionals (pythonAtLeast "3.6") [ tzdata ]);
32
33 nativeCheckInputs = [
34 hypothesis
35 pytestCheckHook
36 pytz
37 ];
38
39 # https://github.com/pganssle/pytz-deprecation-shim/issues/27
40 # https://github.com/pganssle/pytz-deprecation-shim/issues/30
41 # The test suite is just very flaky and breaks all the time
42 doCheck = false;
43
44 meta = with lib; {
45 description = "Shims to make deprecation of pytz easier";
46 homepage = "https://github.com/pganssle/pytz-deprecation-shim";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ dotlambda ];
49 };
50}