depot/third_party/nixpkgs/pkgs/development/python-modules/tzlocal/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

55 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, fetchPypi
, setuptools
, wheel
, pytz-deprecation-shim
, pytest-mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "tzlocal";
version = "5.0.1"; # version needs to be compatible with APScheduler
disabled = pythonOlder "3.7";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-RuuZrUvbcfP3K30k9CZ3U+JAlE7PwW8l0nGbqJgnqAM=";
};
nativeBuildInputs = [
setuptools
wheel
];
propagatedBuildInputs = [
pytz-deprecation-shim
];
nativeCheckInputs = [
pytest-mock
pytestCheckHook
];
disabledTests = [
"test_conflicting"
"test_noconflict"
"test_symlink_localtime"
] ++ lib.optional stdenv.isDarwin "test_assert_tz_offset";
pythonImportsCheck = [ "tzlocal" ];
meta = with lib; {
description = "Tzinfo object for the local timezone";
homepage = "https://github.com/regebro/tzlocal";
changelog = "https://github.com/regebro/tzlocal/blob/${version}/CHANGES.txt";
license = licenses.cddl;
maintainers = with maintainers; [ dotlambda ];
};
}