From 8d9ef57935f30d4e4c8d94f41e8c8b19ee1d1183 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 4 Jul 2024 19:51:40 +0200 Subject: [PATCH] python311Packages.whenever: 0.5.2 -> 0.6.1 Diff: https://github.com/ariebovenberg/whenever/compare/refs/tags/0.5.2...0.6.1 Changelog: https://github.com/ariebovenberg/whenever/blob/refs/tags/0.6.1/CHANGELOG.rst --- .../python-modules/whenever/default.nix | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/whenever/default.nix b/pkgs/development/python-modules/whenever/default.nix index 00fbeb703bf6..184d987f63a7 100644 --- a/pkgs/development/python-modules/whenever/default.nix +++ b/pkgs/development/python-modules/whenever/default.nix @@ -1,11 +1,15 @@ { lib, + stdenv, fetchFromGitHub, pythonOlder, + rustPlatform, + cargo, + rustc, + libiconv, buildPythonPackage, - poetry-core, - backports-zoneinfo, - tzdata, + setuptools, + setuptools-rust, pytestCheckHook, pytest-mypy-plugins, hypothesis, @@ -14,38 +18,54 @@ buildPythonPackage rec { pname = "whenever"; - version = "0.5.2"; + version = "0.6.1"; pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "ariebovenberg"; repo = "whenever"; rev = "refs/tags/${version}"; - hash = "sha256-bG8LV+r5MjA1JwBHWy9/Io4daldAlyEGYNLW+5ITuOw="; + hash = "sha256-uUjQtaqPO/Ie7vVddQhc3dxORX2PxNRaDJzCr+vieUo="; }; - postPatch = '' - # unrecognized arguments since we don't use pytest-benchmark in nixpkgs - substituteInPlace pytest.ini \ - --replace-fail '--benchmark-disable' '#--benchmark-disable' - ''; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + hash = "sha256-8U3pGKY9UQ0JpzUn3Ny6YSD3wzXPDi1pupD5fpEJFvw="; + }; - build-system = [ poetry-core ]; + build-system = [ + setuptools + setuptools-rust + rustPlatform.cargoSetupHook + cargo + rustc + ]; - dependencies = [ tzdata ] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]; + buildInputs = lib.optionals stdenv.isDarwin [ + libiconv + ]; nativeCheckInputs = [ pytestCheckHook pytest-mypy-plugins + # pytest-benchmark # developer sanity check, should not block distribution hypothesis freezegun ]; + disabledTestPaths = [ + # benchmarks + "benchmarks/python/test_date.py" + "benchmarks/python/test_instant.py" + "benchmarks/python/test_local_datetime.py" + "benchmarks/python/test_zoned_datetime.py" + ]; + pythonImportsCheck = [ "whenever" ]; - # early TDD, many tests are failing + # a bunch of failures, including an assumption of what the timezone on the host is # TODO: try enabling on bump doCheck = false;