From 550f53b3e6cfa58df8f7ff33bb5f0a9e0fca48f6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 18 May 2024 11:31:40 +0200 Subject: [PATCH] python312Packages.isoweek: refactor - switch to unittestCheckHook - add pythonImportsCheck --- .../python-modules/isoweek/default.nix | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/isoweek/default.nix b/pkgs/development/python-modules/isoweek/default.nix index e16d27c47bcf..23be48c71a73 100644 --- a/pkgs/development/python-modules/isoweek/default.nix +++ b/pkgs/development/python-modules/isoweek/default.nix @@ -1,18 +1,39 @@ -{ lib, fetchPypi, buildPythonPackage }: +{ lib +, fetchPypi +, buildPythonPackage +, setuptools +, unittestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "isoweek"; version = "1.3.3"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"; + hash = "sha256-c/P3usRD4Fo6tFwypyBIsMTybVPYFGLsSxQsdYHT/+g="; }; + build-system = [ + setuptools + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + pythonImportsCheck = [ + "isoweek" + ]; + meta = with lib; { - description = "The module provide the class Week. Instances represent specific weeks spanning Monday to Sunday."; + description = "Module work with ISO weeks"; homepage = "https://github.com/gisle/isoweek"; + changelog = "https://github.com/gisle/isoweek/releases/tag/v${version}"; license = licenses.bsd2; maintainers = with maintainers; [ mrmebelman ]; };