From 5e01294920aaa58d096926367159e11e1f8027af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 9 Jun 2024 11:26:29 +0200 Subject: [PATCH 1/3] 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; [ ]; }; } From f43fcc42007c017734ec6e927e901239d3b6e877 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 9 Jun 2024 11:31:57 +0200 Subject: [PATCH 2/3] python312Packages.canmatrix: refactor - remove vendorized versioneer.py --- .../python-modules/canmatrix/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix index 40407492fd63..634eec1da39d 100644 --- a/pkgs/development/python-modules/canmatrix/default.nix +++ b/pkgs/development/python-modules/canmatrix/default.nix @@ -12,7 +12,9 @@ pytestCheckHook, pythonOlder, pyyaml, + setuptools, six, + versioneer, xlrd, xlwt, }: @@ -20,7 +22,7 @@ buildPythonPackage rec { pname = "canmatrix"; version = "1.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -32,11 +34,15 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace setup.py \ - --replace "version = versioneer.get_version()" 'version = "${version}"' + # Remove vendorized versioneer.py + rm versioneer.py ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + nativeBuildInputs = [ versioneer ]; + + dependencies = [ attrs click future From bea1d0e3c04159372da4bdaff59891cb60d209fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 9 Jun 2024 12:34:55 +0200 Subject: [PATCH 3/3] python312Packages.pylint-django: disable failing tests --- pkgs/development/python-modules/pylint-django/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix index 13ddc4eabec4..cac67ca5051a 100644 --- a/pkgs/development/python-modules/pylint-django/default.nix +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -46,6 +46,8 @@ buildPythonPackage rec { "test_migrations_plugin" "func_noerror_model_unicode_lambda" "test_linter_should_be_pickleable_with_pylint_django_plugin_installed" + "func_noerror_model_fields" + "func_noerror_form_fields" ]; pythonImportsCheck = [ "pylint_django" ];