From fd8384af70f78388ba6a36033fe29510e586aa80 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 2 Aug 2024 22:53:35 -0400 Subject: [PATCH 1/2] python312Packages.f90nml: Migrate away from `setup.py test` --- pkgs/development/python-modules/f90nml/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/f90nml/default.nix b/pkgs/development/python-modules/f90nml/default.nix index 2657ae73d420..a7b5a0c50f80 100644 --- a/pkgs/development/python-modules/f90nml/default.nix +++ b/pkgs/development/python-modules/f90nml/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, python, setuptools-scm, + unittestCheckHook, }: buildPythonPackage rec { @@ -20,9 +21,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm ]; - checkPhase = '' - ${python.interpreter} setup.py test - ''; + nativeCheckInputs = [ unittestCheckHook ]; pythonImportsCheck = [ "f90nml" ]; From 6bad8d6232d6b047a892e5042f654e2afee9fe31 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 2 Aug 2024 22:54:17 -0400 Subject: [PATCH 2/2] python312Packages.f90nml: modernize --- pkgs/development/python-modules/f90nml/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/f90nml/default.nix b/pkgs/development/python-modules/f90nml/default.nix index a7b5a0c50f80..0a0f735e901a 100644 --- a/pkgs/development/python-modules/f90nml/default.nix +++ b/pkgs/development/python-modules/f90nml/default.nix @@ -2,7 +2,6 @@ lib, buildPythonPackage, fetchFromGitHub, - python, setuptools-scm, unittestCheckHook, }: @@ -10,7 +9,7 @@ buildPythonPackage rec { pname = "f90nml"; version = "1.4.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "marshallward"; @@ -19,17 +18,17 @@ buildPythonPackage rec { hash = "sha256-nSpVBAS2VvXIQwYK/qVVzEc13bicAQ+ScXpO4Rn2O+8="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ setuptools-scm ]; nativeCheckInputs = [ unittestCheckHook ]; pythonImportsCheck = [ "f90nml" ]; - meta = with lib; { + meta = { description = "Python module for working with Fortran Namelists"; mainProgram = "f90nml"; homepage = "https://f90nml.readthedocs.io"; - license = licenses.asl20; - maintainers = with maintainers; [ loicreynier ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ loicreynier ]; }; }