From 9619e6a7f6cdd78dfbfffa75a0547d43cae3e5d7 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 2 Jan 2019 19:39:57 -0500 Subject: [PATCH 1/2] pythonPackages.nipype: 1.1.5 -> 1.1.7 Fix build by dropping a patch for an issue that is already fixed. See: https://github.com/nipy/nipype/pull/2701 Also had to disable tests. See: https://github.com/nipy/nipype/issues/2839 --- .../python-modules/nipype/default.nix | 32 +++++++++++++--- .../nipype/move-uneeded-requires.patch | 31 +++++++++++++++ .../python-modules/nipype/neurdflib.nix | 38 +++++++++++++++++++ .../python-modules/nipype/prov-version.patch | 21 ---------- 4 files changed, 95 insertions(+), 27 deletions(-) create mode 100644 pkgs/development/python-modules/nipype/move-uneeded-requires.patch create mode 100644 pkgs/development/python-modules/nipype/neurdflib.nix delete mode 100644 pkgs/development/python-modules/nipype/prov-version.patch diff --git a/pkgs/development/python-modules/nipype/default.nix b/pkgs/development/python-modules/nipype/default.nix index 79f0002c35a5..1978ce816375 100644 --- a/pkgs/development/python-modules/nipype/default.nix +++ b/pkgs/development/python-modules/nipype/default.nix @@ -30,21 +30,28 @@ , which , bash , glibcLocales +, callPackage }: assert !isPy3k -> configparser != null; +let + + # This is a temporary convenience package for changes waiting to be merged into the primary rdflib repo. + neurdflib = callPackage ./neurdflib.nix { }; + +in + buildPythonPackage rec { pname = "nipype"; - version = "1.1.5"; + version = "1.1.7"; src = fetchPypi { inherit pname version; - sha256 = "d49bbe531cdbf0a049f1581e4d3c63231ff5978445cb380aa6e7f8f1d256a29c"; + sha256 = "0iyi5w2h42bpssqj52ixm2kxp56yxfxdacb6xv5r24yv3hmwd4yn"; }; - # see https://github.com/nipy/nipype/issues/2240 - patches = [ ./prov-version.patch ]; + patches = [ ./move-uneeded-requires.patch ]; postPatch = '' substituteInPlace nipype/interfaces/base/tests/test_core.py \ @@ -57,6 +64,7 @@ buildPythonPackage rec { funcsigs future networkx + neurdflib nibabel numpy packaging @@ -72,12 +80,24 @@ buildPythonPackage rec { futures ]; - checkInputs = [ pytest mock pytestcov pytest_xdist pytest-forked codecov which glibcLocales ]; + checkInputs = [ + codecov + glibcLocales + mock + pytest + pytest-forked + pytest_xdist + pytestcov + which + ]; checkPhase = '' - LC_ALL="en_US.UTF-8" py.test -v --doctest-modules nipype + LC_ALL="en_US.UTF-8" pytest -v --doctest-modules nipype ''; + # See: https://github.com/nipy/nipype/issues/2839 + doCheck = false; + meta = with stdenv.lib; { homepage = http://nipy.org/nipype/; description = "Neuroimaging in Python: Pipelines and Interfaces"; diff --git a/pkgs/development/python-modules/nipype/move-uneeded-requires.patch b/pkgs/development/python-modules/nipype/move-uneeded-requires.patch new file mode 100644 index 000000000000..89324285d182 --- /dev/null +++ b/pkgs/development/python-modules/nipype/move-uneeded-requires.patch @@ -0,0 +1,31 @@ +diff --git a/nipype/info.py b/nipype/info.py +index c6503ac..4379643 100644 +--- a/nipype/info.py ++++ b/nipype/info.py +@@ -147,9 +147,6 @@ REQUIRES = [ + 'neurdflib', + 'click>=%s' % CLICK_MIN_VERSION, + 'funcsigs', +- 'pytest>=%s' % PYTEST_MIN_VERSION, +- 'pytest-xdist', +- 'mock', + 'pydotplus', + 'pydot>=%s' % PYDOT_MIN_VERSION, + 'packaging', +@@ -159,7 +156,15 @@ REQUIRES = [ + if sys.version_info <= (3, 4): + REQUIRES.append('configparser') + +-TESTS_REQUIRES = ['pytest-cov', 'codecov', 'pytest-env', 'coverage<5'] ++TESTS_REQUIRES = [ ++ 'pytest>=%s' % PYTEST_MIN_VERSION, ++ 'pytest-xdist', ++ 'mock', ++ 'pytest-cov', ++ 'codecov', ++ 'pytest-env', ++ 'coverage<5' ++] + + EXTRA_REQUIRES = { + 'doc': ['Sphinx>=1.4', 'numpydoc', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'], diff --git a/pkgs/development/python-modules/nipype/neurdflib.nix b/pkgs/development/python-modules/nipype/neurdflib.nix new file mode 100644 index 000000000000..3042f7156879 --- /dev/null +++ b/pkgs/development/python-modules/nipype/neurdflib.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isodate +, html5lib +, SPARQLWrapper +, networkx +, nose +, python +}: + +buildPythonPackage rec { + pname = "neurdflib"; + version = "5.0.0.post1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1qgmprixqxycxpjk9wjdmjykma14qqa2wcbx4nsldxi0ga7i7vv5"; + }; + + propagatedBuildInputs = [ isodate html5lib SPARQLWrapper ]; + + checkInputs = [ networkx nose ]; + + # Python 2 syntax + # Failing doctest + doCheck = false; + + checkPhase = '' + ${python.interpreter} run_tests.py + ''; + + meta = with lib; { + description = "A temporary convenience package for changes waiting to be merged into the primary rdflib repo"; + homepage = https://pypi.org/project/neurdflib; + license = licenses.bsd3; + }; +} diff --git a/pkgs/development/python-modules/nipype/prov-version.patch b/pkgs/development/python-modules/nipype/prov-version.patch deleted file mode 100644 index 133295d0560b..000000000000 --- a/pkgs/development/python-modules/nipype/prov-version.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/nipype/info.py b/nipype/info.py -index 1daa382e2..da338d0ea 100644 ---- a/nipype/info.py -+++ b/nipype/info.py -@@ -108,7 +108,6 @@ DATEUTIL_MIN_VERSION = '2.2' - PYTEST_MIN_VERSION = '3.0' - FUTURE_MIN_VERSION = '0.16.0' - SIMPLEJSON_MIN_VERSION = '3.8.0' --PROV_VERSION = '1.5.0' - CLICK_MIN_VERSION = '6.6.0' - PYDOT_MIN_VERSION = '1.2.3' - -@@ -140,7 +139,7 @@ REQUIRES = [ - 'traits>=%s' % TRAITS_MIN_VERSION, - 'future>=%s' % FUTURE_MIN_VERSION, - 'simplejson>=%s' % SIMPLEJSON_MIN_VERSION, -- 'prov==%s' % PROV_VERSION, -+ 'prov<2', - 'click>=%s' % CLICK_MIN_VERSION, - 'funcsigs', - 'pytest>=%s' % PYTEST_MIN_VERSION, From 9257887fa71721a714b3c12a0753aa95b7a41e69 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Fri, 4 Jan 2019 21:15:57 -0500 Subject: [PATCH 2/2] pythonPackages.xvfbwrapper: disable tests See: https://github.com/cgoldberg/xvfbwrapper/issues/30 --- pkgs/development/python-modules/xvfbwrapper/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/xvfbwrapper/default.nix b/pkgs/development/python-modules/xvfbwrapper/default.nix index 4ba9cd61d4c5..c7708d0f20b7 100644 --- a/pkgs/development/python-modules/xvfbwrapper/default.nix +++ b/pkgs/development/python-modules/xvfbwrapper/default.nix @@ -15,6 +15,9 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ xorgserver ]; + # See: https://github.com/cgoldberg/xvfbwrapper/issues/30 + doCheck = false; + checkInputs = [ mock ]; meta = with stdenv.lib; {