From 60eaa476abd8639468c222380d32e52bc4eb4607 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 20 Apr 2017 13:41:22 +0200 Subject: [PATCH] pythonPackages.ipython: 5.3.0 -> 6.0.0 --- .../python-modules/ipython/default.nix | 71 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 35 +-------- 2 files changed, 72 insertions(+), 34 deletions(-) create mode 100644 pkgs/development/python-modules/ipython/default.nix diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix new file mode 100644 index 00000000000..0823a76e2a6 --- /dev/null +++ b/pkgs/development/python-modules/ipython/default.nix @@ -0,0 +1,71 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +# Build dependencies +, glibcLocales +# Test dependencies +, nose +, pygments +, isPy27 +, mock +# Runtime dependencies +, jedi +, decorator +, pickleshare +, simplegeneric +, traitlets +, prompt_toolkit +, pexpect +, appnope +}: + +buildPythonPackage rec { + pname = "ipython"; + version = "6.0.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "f429b82b8d9807068da734b15965768bd21b15d0b706340b6d1b4d6f6f5b98a4"; + }; + + prePatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace setup.py --replace "'gnureadline'" " " + ''; + + buildInputs = [ glibcLocales ]; + + checkInputs = [ nose pygments ] ++ lib.optional isPy27 mock; + + propagatedBuildInputs = [ + jedi + decorator + pickleshare + simplegeneric + traitlets + prompt_toolkit + pexpect + ] ++ lib.optionals stdenv.isDarwin [appnope]; + + LC_ALL="en_US.UTF-8"; + + doCheck = false; # Circular dependency with ipykernel + + checkPhase = '' + nosetests + ''; + + # IPython 6.0.0 and above does not support Python < 3.3. + # The last IPython version to support older Python versions + # is 5.3.x. + disabled = pythonOlder "3.3"; + + meta = { + description = "IPython: Productive Interactive Computing"; + homepage = http://ipython.org/; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ bjornfor jgeerds fridh ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bcc4194e3c9..7739d744414 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13085,40 +13085,7 @@ in { ipyparallel = callPackage ../development/python-modules/ipyparallel { }; - ipython = buildPythonPackage rec { - version = "5.3.0"; - name = "ipython-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/i/ipython/${name}.tar.gz"; - sha256 = "bf5e615e7d96dac5a61fbf98d9e2926d98aa55582681bea7e9382992a3f43c1d"; - }; - - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' - substituteInPlace setup.py --replace "'gnureadline'" " " - ''; - - buildInputs = with self; [ nose pkgs.glibcLocales pygments ] ++ optionals isPy27 [mock]; - - propagatedBuildInputs = with self; - [ backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit - simplegeneric traitlets requests2 pathlib2 pexpect ] - ++ 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 = licenses.bsd3; - maintainers = with maintainers; [ bjornfor jgeerds fridh ]; - }; - }; + ipython = callPackage ../development/python-modules/ipython { }; ipython_genutils = buildPythonPackage rec { version = "0.2.0";