From 5e01294920aaa58d096926367159e11e1f8027af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 9 Jun 2024 11:26:29 +0200 Subject: [PATCH] python312Packages.xlwt: refactor - replace nose with pynose - add pythonImportsCheck - migrate to build-system - disable on unsupported Python releases --- .../python-modules/xlwt/default.nix | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/xlwt/default.nix b/pkgs/development/python-modules/xlwt/default.nix index 67b2de049e87..b47a5c4e3cdd 100644 --- a/pkgs/development/python-modules/xlwt/default.nix +++ b/pkgs/development/python-modules/xlwt/default.nix @@ -1,32 +1,46 @@ { + lib, buildPythonPackage, fetchPypi, - nose, - lib, + pynose, + setuptools, + pythonOlder, }: buildPythonPackage rec { pname = "xlwt"; version = "1.3.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "c59912717a9b28f1a3c2a98fd60741014b06b043936dcecbc113eaaada156c88"; + hash = "sha256-xZkScXqbKPGjwqmP1gdBAUsGsEOTbc7LwRPqqtoVbIg="; }; - nativeCheckInputs = [ nose ]; + build-system = [ setuptools ]; + + nativeCheckInputs = [ pynose ]; + checkPhase = '' + runHook preCheck + nosetests -v + + runHook postCheck ''; - meta = { + pythonImportsCheck = [ "xlwt" ]; + + meta = with lib; { description = "Library to create spreadsheet files compatible with MS"; homepage = "https://github.com/python-excel/xlwt"; - license = with lib.licenses; [ + license = with licenses; [ bsdOriginal bsd3 - lgpl21 + lgpl21Plus ]; + maintainers = with maintainers; [ ]; }; }