Skip to content

Commit

Permalink
python36Packages.ipython: 7.17 -> 7.16.1 (downgrade)
Browse files Browse the repository at this point in the history
IPython versions 7.17 and higher don't support Python 3.6 anymore, so
this commit adds back the old expression for 7.16.1 from before
ba1038a for use in python36Packages
only.

    nix-repl> :b python36.withPackages (ps: [ ps.ipython ])
    builder for '/nix/store/q8v4f89xwv35a3idb9z345z6n3nzfycb-python3.6-ipython-7.17.0.drv' failed with exit code 1; last 10 log lines:
      Python 3.5 was supported with IPython 7.0 to 7.9.
      Python 3.6 was supported with IPython up to 7.16.

      See IPython `README.rst` file for more information:

          https://github.com/ipython/ipython/blob/master/README.rst

      Python sys.version_info(major=3, minor=6, micro=12, releaselevel='final', serial=0) detected.
    cannot build derivation '/nix/store/mhpdarp18z6skzswrl7sbgzv8hr4gwih-python3-3.6.12-env.drv': 1 dependencies couldn't be built
    [0 built (1 failed)]
    error: build of '/nix/store/mhpdarp18z6skzswrl7sbgzv8hr4gwih-python3-3.6.12-env.drv' failed

(cherry picked from commit eabba0d)
  • Loading branch information
kini authored and Jonathan Ringer committed Nov 25, 2020
1 parent f900be5 commit 280e05f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
70 changes: 70 additions & 0 deletions pkgs/development/python-modules/ipython/7.16.nix
@@ -0,0 +1,70 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
# Build dependencies
, glibcLocales
# Test dependencies
, nose
, pygments
# Runtime dependencies
, jedi
, decorator
, pickleshare
, traitlets
, prompt_toolkit
, pexpect
, appnope
, backcall
, fetchpatch
}:

buildPythonPackage rec {
pname = "ipython";
version = "7.16.1";
disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
sha256 = "9f4fcb31d3b2c533333893b9172264e4821c1ac91839500f31bd43f2c59b3ccf";
};

prePatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py --replace "'gnureadline'" " "
'';

buildInputs = [ glibcLocales ];

checkInputs = [ nose pygments ];

propagatedBuildInputs = [
jedi
decorator
pickleshare
traitlets
prompt_toolkit
pygments
pexpect
backcall
] ++ lib.optionals stdenv.isDarwin [appnope];

LC_ALL="en_US.UTF-8";

doCheck = false; # Circular dependency with ipykernel

checkPhase = ''
nosetests
'';

pythonImportsCheck = [
"IPython"
];

meta = with lib; {
description = "IPython: Productive Interactive Computing";
homepage = "http://ipython.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ bjornfor fridh ];
};
}
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/ipython/default.nix
Expand Up @@ -23,7 +23,7 @@
buildPythonPackage rec {
pname = "ipython";
version = "7.17.0";
disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -2931,6 +2931,8 @@ in {

ipython = if isPy27 then
callPackage ../development/python-modules/ipython/5.nix { }
else if isPy36 then
callPackage ../development/python-modules/ipython/7.16.nix { }
else
callPackage ../development/python-modules/ipython { };

Expand Down

0 comments on commit 280e05f

Please sign in to comment.