summary refs log tree commit diff
path: root/pkgs/development/python-modules/ipython
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-04-27 09:09:04 +0000
committerFrederik Rietdijk <fridh@fridh.nl>2017-05-01 05:56:38 +0200
commit2efb099c009ae257e85381d76f470ca2569658a6 (patch)
treea7a545130ce6524b7067606c71983eff5b3351f5 /pkgs/development/python-modules/ipython
parent01ba1a40d3a6f1ce72341215b3b2a636455c913a (diff)
downloadnixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar.gz
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar.bz2
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar.lz
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar.xz
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.tar.zst
nixlib-2efb099c009ae257e85381d76f470ca2569658a6.zip
pythonPackages.ipython: support python2
Fixes #25234
Diffstat (limited to 'pkgs/development/python-modules/ipython')
-rw-r--r--pkgs/development/python-modules/ipython/5.nix65
-rw-r--r--pkgs/development/python-modules/ipython/default.nix4
2 files changed, 66 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/ipython/5.nix b/pkgs/development/python-modules/ipython/5.nix
new file mode 100644
index 000000000000..011c86652902
--- /dev/null
+++ b/pkgs/development/python-modules/ipython/5.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+# Build dependencies
+, glibcLocales
+# Test dependencies
+, nose
+, pygments
+, testpath
+, isPy27
+, mock
+# Runtime dependencies
+, backports_shutil_get_terminal_size
+, jedi
+, decorator
+, pathlib2
+, pickleshare
+, requests2
+, simplegeneric
+, traitlets
+, prompt_toolkit
+, pexpect
+, appnope
+}:
+
+buildPythonPackage rec {
+  pname = "ipython";
+  version = "5.3.0";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "bf5e615e7d96dac5a61fbf98d9e2926d98aa55582681bea7e9382992a3f43c1d";
+  };
+
+  prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace setup.py --replace "'gnureadline'" " "
+  '';
+
+  buildInputs = [ glibcLocales ];
+
+  checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock;
+
+  propagatedBuildInputs = [
+    backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit
+    simplegeneric traitlets requests2 pathlib2 pexpect
+  ] ++ lib.optionals stdenv.isDarwin [ appnope ];
+
+  LC_ALL="en_US.UTF-8";
+
+  doCheck = false; # Circular dependency with ipykernel
+
+  checkPhase = ''
+    nosetests
+  '';
+
+  meta = {
+    description = "IPython: Productive Interactive Computing";
+    homepage = http://ipython.org/;
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ bjornfor jgeerds orivej lnl7 ];
+  };
+}
diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix
index 0823a76e2a69..de7d0a8d81b8 100644
--- a/pkgs/development/python-modules/ipython/default.nix
+++ b/pkgs/development/python-modules/ipython/default.nix
@@ -8,8 +8,6 @@
 # Test dependencies
 , nose
 , pygments
-, isPy27
-, mock
 # Runtime dependencies
 , jedi
 , decorator
@@ -37,7 +35,7 @@ buildPythonPackage rec {
 
   buildInputs = [ glibcLocales ];
 
-  checkInputs = [ nose pygments ] ++ lib.optional isPy27 mock;
+  checkInputs = [ nose pygments ];
 
   propagatedBuildInputs = [
     jedi