From ee7612ad4441269a97ec496c7315dd4309d15766 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 22 Dec 2022 17:34:30 +0000 Subject: [PATCH 1/2] python310Packages.python-crontab: 2.6.0 -> 2.7.1 --- pkgs/development/python-modules/python-crontab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-crontab/default.nix b/pkgs/development/python-modules/python-crontab/default.nix index 9de0801d5375..325dcb3f4fa9 100644 --- a/pkgs/development/python-modules/python-crontab/default.nix +++ b/pkgs/development/python-modules/python-crontab/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "python-crontab"; - version = "2.6.0"; + version = "2.7.1"; src = fetchPypi { inherit pname version; - sha256 = "1e35ed7a3cdc3100545b43e196d34754e6551e7f95e4caebbe0e1c0ca41c2f1b"; + sha256 = "sha256-shr0ZHx7u4SP7y8CBhbGsCidy5+UtPmRpVMQ/5vsV0k="; }; checkInputs = [ pytestCheckHook ]; From 5f1760cb902c3b964fdfeeaf7be5bd3e42dfa8df Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Dec 2022 21:08:25 +0100 Subject: [PATCH 2/2] python310Packages.python-crontab: disabled on older Python releases - add pythonImportsCheck --- .../python-modules/python-crontab/default.nix | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/python-crontab/default.nix b/pkgs/development/python-modules/python-crontab/default.nix index 325dcb3f4fa9..644d00fb337c 100644 --- a/pkgs/development/python-modules/python-crontab/default.nix +++ b/pkgs/development/python-modules/python-crontab/default.nix @@ -1,22 +1,40 @@ -{ lib, buildPythonPackage, fetchPypi, python-dateutil, pytestCheckHook }: +{ lib +, buildPythonPackage +, fetchPypi +, python-dateutil +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "python-crontab"; version = "2.7.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-shr0ZHx7u4SP7y8CBhbGsCidy5+UtPmRpVMQ/5vsV0k="; + hash = "sha256-shr0ZHx7u4SP7y8CBhbGsCidy5+UtPmRpVMQ/5vsV0k="; }; - checkInputs = [ pytestCheckHook ]; + propagatedBuildInputs = [ + python-dateutil + ]; + + checkInputs = [ + pytestCheckHook + ]; + disabledTests = [ "test_07_non_posix_shell" # doctest that assumes /tmp is writeable, awkward to patch "test_03_usage" ]; - propagatedBuildInputs = [ python-dateutil ]; + pythonImportsCheck = [ + "crontab" + ]; meta = with lib; { description = "Python API for crontab"; @@ -24,7 +42,7 @@ buildPythonPackage rec { Crontab module for reading and writing crontab files and accessing the system cron automatically and simply using a direct API. ''; - homepage = "https://pypi.org/project/python-crontab/"; + homepage = "https://gitlab.com/doctormo/python-crontab/"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ kfollesdal ]; };