Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.nipype: 0.10.0 -> 0.14.0 #33916

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/prov/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, lxml
, networkx
, dateutil
, six
, pydotplus
, rdflib
}:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no name

pname = "prov";
version = "1.5.0";

src = fetchPypi {
inherit pname version;
sha256 = "1vkpayns0mf7i2357vxyvi2n5h5xsyg56ik2yqgrc91k3gx4x9wn";
};

propagatedBuildInputs = [
lxml
networkx
dateutil
six
pydotplus
rdflib
];
doCheck = false; # takes forever!
Copy link
Member

@Mic92 Mic92 Jan 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a meta attributes here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "forever"? Test suites of most scientific python packages take some time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this now (I wrote some of these expressions a number of months ago).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran 956 tests in 3594.012s

FAILED (failures=22, expected failures=17)
Test failed: <unittest.runner.TextTestResult run=956 errors=0 failures=22>

So about an hour (total build time was about an hour and 10).

I am investigating whether the errors are present in 1.5.1 before reporting upstream. (NB: Nipype currently requires exactly 1.5.0, this is being dealt with)


meta = with stdenv.lib; {
description = "A Python library for W3C Provenance Data Model (PROV)";
homepage = https://github.com/trungdong/prov;
license = licenses.mit;
maintainers = with maintainers; [ ashgillman ];
};
}
29 changes: 29 additions & 0 deletions pkgs/development/python-modules/pydotplus/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pyparsing
, graphviz
}:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no name

pname = "pydotplus";
version = "2.0.2";

src = fetchPypi {
inherit pname version;
sha256 = "1i05cnk3yh722fdyaq0asr7z9xf7v7ikbmnpxa8j6pdqx6g5xs4i";
};

propagatedBuildInputs = [
pyparsing
graphviz
];

meta = with stdenv.lib; {
homepage = https://github.com/erocarrera/pydot;
description = "An improved version of the old pydot project that provides a Python Interface to Graphviz’s Dot language";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License is missing; do you want to maintain this package?

license = licenses.mit;
maintainers = with maintainers; [ ashgillman ];
};
}
24 changes: 24 additions & 0 deletions pkgs/development/python-modules/xvfbwrapper/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, xorgserver
}:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean sorry. There should be no name attr? https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.md recommends this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That example should indeed be updated. buildPython* functions fill in name when given pname and version.

pname = "xvfbwrapper";
version = "0.2.9";

src = fetchPypi {
inherit pname version;
sha256 = "097wxhvp01ikqpg1z3v8rqhss6f1vwr399zpz9a05d2135bsxx5w";
};
propagatedBuildInputs = [ xorgserver ];

meta = with stdenv.lib; {
description = "Run headless display inside X virtual framebuffer (Xvfb)";
homepage = https://github.com/cgoldberg/xvfbwrapper;
license = licenses.mit;
maintainers = with maintainers; [ ashgillman ];
};
}
63 changes: 40 additions & 23 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6196,6 +6196,8 @@ in {
};
};

prov = callPackage ../development/python-modules/prov { };

pudb = buildPythonPackage rec {
name = "pudb-2016.2";

Expand Down Expand Up @@ -6293,6 +6295,8 @@ in {
inherit (pkgs.stdenv) mkDerivation;
};

pydotplus = callPackage ../development/python-modules/pydotplus { };

pyphen = callPackage ../development/python-modules/pyphen {};

pypoppler = buildPythonPackage rec {
Expand Down Expand Up @@ -11316,17 +11320,18 @@ in {
});

nibabel = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are moving Python expressions out of pkgs/top-level/python-packages.nix into pkgs/development/python-modules/<module>/default.nix.

Please move the expression there, and call it from pkgs/top-level/python-packages.nix using callPackage ../development/python-modules/<package> { };.

version = "2.0.2";
version = "2.2.0";
name = "nibabel-${version}";

src = pkgs.fetchurl {
url = "mirror://pypi/n/nibabel/${name}.tar.gz";
sha256 = "0k8mv5zmwb6vc8kwrydl3pp0pnw937rf5mz10figkxczrw6dkk7h";
sha256 = "1h6nhi1s2ab7sdyyl3qjnvlw0kggcnam7vn4b3z56ay20596kvhw";
};

propagatedBuildInputs = with self; [
numpy
nose
six
];

# Failing tests
Expand Down Expand Up @@ -11387,34 +11392,42 @@ in {
};

nipype = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are moving Python expressions out of pkgs/top-level/python-packages.nix into pkgs/development/python-modules/<module>/default.nix.

Please move the expression there, and call it from pkgs/top-level/python-packages.nix using callPackage ../development/python-modules/<package> { };.

version = "0.10.0";
version = "0.14.0";
name = "nipype-${version}";

# Uses python 2 print. Master seems to be Py3 compatible.
disabled = isPy3k;

src = pkgs.fetchurl {
url = "mirror://pypi/n/nipype/${name}.tar.gz";
sha256 = "7fb143cd4d05f18db1cb7f0b83dba13d3dcf55b4eb3d16df08c97033ccae507b";
sha256 = "0airdrh93vwmbfkqxp5cqfzm0zzqcvjnvphv3zhg197y39xxpl1k";
};

# Tests fail due to getcwd returning ENOENT???
doCheck = false;

doCheck = false; # fails with TypeError: None is not callable
checkInputs = [ pkgs.which ];
buildInputs = with self; [ pytest mock ];
propagatedBuildInputs = with self; [
numpy
dateutil
nose
traits
scipy
nibabel
networkx
];
click
dateutil
funcsigs
future
networkx
nibabel
numpy
packaging
prov
psutil
pydot
scipy
simplejson
traits
xvfbwrapper
] ++ stdenv.lib.optional (!isPy3k) [
configparser
];

meta = {
homepage = http://nipy.org/nipype/;
description = "Neuroimaging in Python: Pipelines and Interfaces";
license = licenses.bsd3;
maintainers = with maintainers; [ ashgillman ];
};
};

Expand Down Expand Up @@ -15606,11 +15619,11 @@ in {


rdflib = buildPythonPackage (rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are moving Python expressions out of pkgs/top-level/python-packages.nix into pkgs/development/python-modules/<module>/default.nix.

Please move the expression there, and call it from pkgs/top-level/python-packages.nix using callPackage ../development/python-modules/<package> { };.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

name = "rdflib-4.1.2";
name = "rdflib-4.2.2";

src = pkgs.fetchurl {
url = "mirror://pypi/r/rdflib/${name}.tar.gz";
sha256 = "0kvaf332cqbi47rqzlpdx4mbkvw12mkrzkj8n9l19wk713d4py9w";
sha256 = "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs";
};

# error: invalid command 'test'
Expand Down Expand Up @@ -17851,11 +17864,11 @@ in {

traits = buildPythonPackage rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are moving Python expressions out of pkgs/top-level/python-packages.nix into pkgs/development/python-modules/<module>/default.nix.

Please move the expression there, and call it from pkgs/top-level/python-packages.nix using callPackage ../development/python-modules/<package> { };.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

name = "traits-${version}";
version = "4.5.0";
version = "4.6.0";

src = pkgs.fetchurl {
url = "mirror://pypi/t/traits/${name}.tar.gz";
sha256 = "5293a8786030b0b243e059f52004355b6939d7c0f1be2eb5a605b63cca484c84";
sha256 = "0w43qv36wnrimlh0nzzgg81315a18yza3vk494wqxf1l19g390jx";
};

# Use pytest because its easier to discover tests
Expand All @@ -17868,7 +17881,7 @@ in {
# https://github.com/enthought/traits/issues/187
# https://github.com/enthought/traits/pull/188
# Furthermore, some tests fail due to being in a chroot
doCheck = false;
doCheck = isPy33;

propagatedBuildInputs = with self; [ numpy ];

Expand Down Expand Up @@ -21677,6 +21690,10 @@ EOF
};
};

xvfbwrapper = callPackage ../development/python-modules/xvfbwrapper {
inherit (pkgs.xorg) xorgserver;
};

hidapi = callPackage ../development/python-modules/hidapi {
inherit (pkgs) udev libusb1;
};
Expand Down