From a42847acf1fe30d9c4088474d58cf14b137cdeb4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 10:14:22 +0100 Subject: [PATCH 1/4] python3Packages.apptools: adjust inputs and disable tests --- .../python-modules/apptools/default.nix | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/apptools/default.nix b/pkgs/development/python-modules/apptools/default.nix index 4ee3add12b13..1b67f4921e26 100644 --- a/pkgs/development/python-modules/apptools/default.nix +++ b/pkgs/development/python-modules/apptools/default.nix @@ -1,12 +1,24 @@ -{ lib, fetchPypi, buildPythonPackage -, fetchpatch, configobj, six, traitsui -, pytestCheckHook, tables, pandas -, pythonOlder, importlib-resources +{ lib +, buildPythonPackage +, configobj +, fetchpatch +, fetchPypi +, importlib-resources +, pandas +, pytestCheckHook +, pythonAtLeast +, pythonOlder +, tables +, traits +, traitsui }: buildPythonPackage rec { pname = "apptools"; version = "5.1.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -24,7 +36,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ configobj - six + traits traitsui ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources @@ -40,10 +52,22 @@ buildPythonPackage rec { export HOME=$TMP ''; + disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [ + # https://github.com/enthought/apptools/issues/303 + "apptools/io/h5/tests/test_dict_node.py" + "apptools/io/h5/tests/test_file.py" + "apptools/io/h5/tests/test_table_node.py" + ]; + + + pythonImportsCheck = [ + "apptools" + ]; + meta = with lib; { - description = "Set of packages that Enthought has found useful in creating a number of applications."; + description = "Set of packages that Enthought has found useful in creating a number of applications"; homepage = "https://github.com/enthought/apptools"; - maintainers = with maintainers; [ knedlsepp ]; license = licenses.bsdOriginal; + maintainers = with maintainers; [ knedlsepp ]; }; } From 6828eb8e559d5bdc149bea22e4c2a34ad367c425 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 10:44:27 +0100 Subject: [PATCH 2/4] python310Packages.traits: cleanup --- .../python-modules/traits/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/traits/default.nix b/pkgs/development/python-modules/traits/default.nix index 4e93f1369dd3..9e6b1a5056da 100644 --- a/pkgs/development/python-modules/traits/default.nix +++ b/pkgs/development/python-modules/traits/default.nix @@ -1,29 +1,30 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 -, python +, pythonOlder , numpy +, pytestCheckHook }: buildPythonPackage rec { pname = "traits"; version = "6.3.2"; - disabled = isPy27; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "4520ef4a675181f38be4a5bab1b1d5472691597fe2cfe4faf91023e89407e2c6"; }; - propagatedBuildInputs = [ numpy ]; - - # Test suite is broken for 3.x on latest release - # https://github.com/enthought/traits/issues/187 - # https://github.com/enthought/traits/pull/188 - # Furthermore, some tests fail due to being in a chroot + # Circular dependency doCheck = false; + pythonImportsCheck = [ + "traits" + ]; + meta = with lib; { description = "Explicitly typed attributes for Python"; homepage = "https://pypi.python.org/pypi/traits"; From 509be35c30df4c80e12ac5273d81ec4a2f166d8f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 10:53:55 +0100 Subject: [PATCH 3/4] python310Packages.envisage: disable failing tests --- .../python-modules/envisage/default.nix | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/envisage/default.nix b/pkgs/development/python-modules/envisage/default.nix index b8513fd1d9ae..f40ab66baabd 100644 --- a/pkgs/development/python-modules/envisage/default.nix +++ b/pkgs/development/python-modules/envisage/default.nix @@ -1,19 +1,21 @@ { lib -, fetchPypi -, isPy27 -, buildPythonPackage -, traits , apptools -, pytestCheckHook +, buildPythonPackage +, fetchPypi , ipython +, pytestCheckHook +, pythonAtLeast +, pythonOlder , setuptools +, traits }: buildPythonPackage rec { pname = "envisage"; version = "6.0.1"; + format = "setuptools"; - disabled = isPy27; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; @@ -22,7 +24,11 @@ buildPythonPackage rec { # for the optional dependency ipykernel, only versions < 6 are # supported, so it's not included in the tests, and not propagated - propagatedBuildInputs = [ traits apptools setuptools ]; + propagatedBuildInputs = [ + traits + apptools + setuptools + ]; preCheck = '' export HOME=$PWD/HOME @@ -33,10 +39,20 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [ + # https://github.com/enthought/envisage/issues/455 + "envisage/tests/test_egg_basket_plugin_manager.py" + "envisage/tests/test_egg_plugin_manager.py" + ]; + + pythonImportsCheck = [ + "envisage" + ]; + meta = with lib; { - description = "Framework for building applications whose functionalities can be extended by adding 'plug-ins'"; + description = "Framework for building applications whose functionalities can be extended by adding plug-ins"; homepage = "https://github.com/enthought/envisage"; - maintainers = with lib.maintainers; [ knedlsepp ]; license = licenses.bsdOriginal; + maintainers = with lib.maintainers; [ knedlsepp ]; }; } From 0bb8de5df1327cb1b70addf48b803a9710ea85ec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 10:55:16 +0100 Subject: [PATCH 4/4] python310Packages.mayavi: add pythonImportsCheck --- .../python-modules/mayavi/default.nix | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/mayavi/default.nix b/pkgs/development/python-modules/mayavi/default.nix index 6f13e63b9341..7ffbbf888f34 100644 --- a/pkgs/development/python-modules/mayavi/default.nix +++ b/pkgs/development/python-modules/mayavi/default.nix @@ -1,16 +1,27 @@ -{ lib, buildPythonPackage, pythonOlder, fetchPypi, wrapQtAppsHook -, pyface, pygments, numpy, vtk, traitsui, envisage, apptools, pyqt5 +{ lib +, apptools +, buildPythonPackage +, envisage +, fetchPypi +, numpy +, pyface +, pygments +, pyqt5 +, pythonOlder +, traitsui +, vtk +, wrapQtAppsHook }: buildPythonPackage rec { pname = "mayavi"; version = "4.7.4"; + format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - extension = "tar.gz"; sha256 = "ec50e7ec6afb0f9224ad1863d104a0d1ded6c8deb13e720652007aaca2303332"; }; @@ -24,14 +35,27 @@ buildPythonPackage rec { --replace "build.build.run(self)" "build.build.run(self); return" ''; - nativeBuildInputs = [ wrapQtAppsHook ]; - - propagatedBuildInputs = [ - pyface pygments numpy vtk traitsui envisage apptools pyqt5 + nativeBuildInputs = [ + wrapQtAppsHook ]; - doCheck = false; # Needs X server - pythonImportsCheck = [ "mayavi" ]; + propagatedBuildInputs = [ + apptools + envisage + numpy + pyface + pygments + pyqt5 + traitsui + vtk + ]; + + # Needs X server + doCheck = false; + + pythonImportsCheck = [ + "mayavi" + ]; preFixup = '' makeWrapperArgs+=("''${qtWrapperArgs[@]}") @@ -40,7 +64,7 @@ buildPythonPackage rec { meta = with lib; { description = "3D visualization of scientific data in Python"; homepage = "https://github.com/enthought/mayavi"; - maintainers = with maintainers; [ knedlsepp ]; license = licenses.bsdOriginal; + maintainers = with maintainers; [ knedlsepp ]; }; }