2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
|
|
|
, backports-zoneinfo
|
|
|
|
, python-dateutil
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
, tzdata
|
|
|
|
, hypothesis
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytz
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytz-deprecation-shim";
|
|
|
|
version = "0.1.0.post0";
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "pytz_deprecation_shim";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d";
|
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = (lib.optionals (pythonAtLeast "3.6" && pythonOlder "3.9") [
|
|
|
|
backports-zoneinfo
|
|
|
|
]) ++ (lib.optionals (pythonOlder "3.6") [
|
|
|
|
python-dateutil
|
|
|
|
]) ++ (lib.optionals (pythonAtLeast "3.6") [
|
|
|
|
tzdata
|
|
|
|
]);
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
# https://github.com/pganssle/pytz-deprecation-shim/issues/27
|
2022-11-21 17:40:18 +00:00
|
|
|
# https://github.com/pganssle/pytz-deprecation-shim/issues/30
|
|
|
|
# The test suite is just very flaky and breaks all the time
|
|
|
|
doCheck = false;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Shims to make deprecation of pytz easier";
|
|
|
|
homepage = "https://github.com/pganssle/pytz-deprecation-shim";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|