From 3afdc2c8bcb51f66b106c8aac33b19bcd3d8aa29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 13 Nov 2021 13:26:14 -0800 Subject: [PATCH] python3Packages.tzlocal: 2.1 -> 4.1 --- .../python-modules/tzlocal/default.nix | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/tzlocal/default.nix b/pkgs/development/python-modules/tzlocal/default.nix index 363e1d12a55e..c735ee38ea98 100644 --- a/pkgs/development/python-modules/tzlocal/default.nix +++ b/pkgs/development/python-modules/tzlocal/default.nix @@ -1,19 +1,37 @@ -{ lib, buildPythonPackage, fetchPypi -, pytz }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, pytz-deprecation-shim +, pytest-mock +, pytestCheckHook +}: buildPythonPackage rec { pname = "tzlocal"; - version = "2.1"; # version needs to be compatible with APScheduler + version = "4.1"; # version needs to be compatible with APScheduler - propagatedBuildInputs = [ pytz ]; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"; + sha256 = "sha256-DygBWsaKXAZyEEAKkZf8XTa6m8P46vHaPL1ZrN/tngk="; }; - # test fail (timezone test fail) - doCheck = false; + propagatedBuildInputs = [ + pytz-deprecation-shim + ]; + + checkInputs = [ + pytest-mock + pytestCheckHook + ]; + + disabledTests = [ + "test_conflicting" + "test_noconflict" + "test_symlink_localtime" + ]; pythonImportsCheck = [ "tzlocal" ];