From fa03d60746ae10a6149196bc08d90f8bf39c2ff1 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Sat, 7 May 2022 08:52:40 +0200 Subject: [PATCH 1/2] python3Packages.nutils: fix test issues Signed-off-by: Florian Brandes --- .../python-modules/nutils/default.nix | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/nutils/default.nix b/pkgs/development/python-modules/nutils/default.nix index 88486910796..9e42027ac2e 100644 --- a/pkgs/development/python-modules/nutils/default.nix +++ b/pkgs/development/python-modules/nutils/default.nix @@ -1,15 +1,18 @@ -{ lib, python, buildPythonPackage, fetchPypi, numpy, treelog, stringly, coverage }: +{ lib, buildPythonPackage, fetchFromGitHub, numpy, treelog, stringly, pytestCheckHook, pythonOlder }: buildPythonPackage rec { pname = "nutils"; version = "7.0"; + disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "1sw310l2yb8wbcv2qhik8s928zjh2syzz2qxisglbzski9qdw2x6"; + src = fetchFromGitHub { + owner = "evalf"; + repo = "nutils"; + rev = "refs/tags/v${version}"; + hash = "sha256-V7lSMhwzc9+36uXMCy5uF241XwJ62Pdf59RUulOt4i8="; }; - pythonImportChecks = [ "nutils" ]; + pythonImportsCheck = [ "nutils" ]; propagatedBuildInputs = [ numpy @@ -17,11 +20,13 @@ buildPythonPackage rec { stringly ]; - checkInputs = [ coverage ]; + checkInputs = [ pytestCheckHook ]; + + disabledTestPaths = [ + # AttributeError: type object 'setup' has no attribute '__code__' + "tests/test_cli.py" + ]; - checkPhase = '' - ${python.interpreter} -m unittest - ''; meta = with lib; { description = "Numerical Utilities for Finite Element Analysis"; From f174d308de4fe8a3854bbb4ca4f8aca5384c119b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 7 May 2022 15:49:07 +0200 Subject: [PATCH 2/2] python310Packages.nutils: add format --- .../python-modules/nutils/default.nix | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/nutils/default.nix b/pkgs/development/python-modules/nutils/default.nix index 9e42027ac2e..84003ce30be 100644 --- a/pkgs/development/python-modules/nutils/default.nix +++ b/pkgs/development/python-modules/nutils/default.nix @@ -1,8 +1,18 @@ -{ lib, buildPythonPackage, fetchFromGitHub, numpy, treelog, stringly, pytestCheckHook, pythonOlder }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, treelog +, stringly +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "nutils"; version = "7.0"; + format = "setuptools"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { @@ -12,26 +22,29 @@ buildPythonPackage rec { hash = "sha256-V7lSMhwzc9+36uXMCy5uF241XwJ62Pdf59RUulOt4i8="; }; - pythonImportsCheck = [ "nutils" ]; - propagatedBuildInputs = [ numpy treelog stringly ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "nutils" + ]; disabledTestPaths = [ # AttributeError: type object 'setup' has no attribute '__code__' "tests/test_cli.py" ]; - meta = with lib; { description = "Numerical Utilities for Finite Element Analysis"; homepage = "https://www.nutils.org/"; license = licenses.mit; - maintainers = [ maintainers.Scriptkiddi ]; + maintainers = with maintainers; [ Scriptkiddi ]; }; }