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

Update jupyter packages to python 3 only packages with 27 support #49721

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion pkgs/applications/misc/haxor-news/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildPythonApplication rec {
colorama
requests
pygments
prompt_toolkit
prompt_toolkit_1
six
];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/gns3/server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ in pythonPackages.buildPythonPackage rec {
++ (with pythonPackages; [
yarl aiohttp multidict
jinja2 psutil zipstream raven jsonschema typing
prompt_toolkit
prompt_toolkit_1
]);

# Requires network access
Expand Down
41 changes: 41 additions & 0 deletions pkgs/development/python-modules/ipykernel/4.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, isPy27
, mock
, ipython
, jupyter_client
, pexpect
, traitlets
, tornado
}:

buildPythonPackage rec {
pname = "ipykernel";
version = "4.10.0";

src = fetchPypi {
inherit pname version;
sha256 = "699103c8e64886e3ec7053f2a6aa83bb90426063526f63a818732ff385202bad";
};

checkInputs = [ nose ] ++ lib.optional isPy27 mock;
propagatedBuildInputs = [
ipython
jupyter_client
pexpect
traitlets
tornado
];

# Tests require backends.
# I don't want to add all supported backends as propagatedBuildInputs
doCheck = false;

meta = {
description = "IPython Kernel for Jupyter";
homepage = http://ipython.org/;
license = lib.licenses.bsd3;
};
}
30 changes: 12 additions & 18 deletions pkgs/development/python-modules/ipykernel/default.nix
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, isPy27
, mock
, ipython
, jupyter_client
, pexpect
, traitlets
, tornado
, pythonOlder
, pytest
, nose
}:

buildPythonPackage rec {
pname = "ipykernel";
version = "4.8.2";
version = "5.1.0";
disabled = pythonOlder "3.4";

src = fetchPypi {
inherit pname version;
sha256 = "c091449dd0fad7710ddd9c4a06e8b9e15277da306590bc07a3a1afa6b4453c8f";
sha256 = "0fc0bf97920d454102168ec2008620066878848fcfca06c22b669696212e292f";
};

buildInputs = [ nose ] ++ lib.optional isPy27 mock;
propagatedBuildInputs = [
ipython
jupyter_client
pexpect
traitlets
tornado
];
checkInputs = [ pytest nose ];
propagatedBuildInputs = [ ipython jupyter_client traitlets tornado ];

# Tests require backends.
# I don't want to add all supported backends as propagatedBuildInputs
doCheck = false;
checkPhase = ''
HOME=$(mktemp -d) pytest ipykernel
'';

meta = {
description = "IPython Kernel for Jupyter";
homepage = http://ipython.org/;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fridh ];
};
}
}
18 changes: 4 additions & 14 deletions pkgs/development/python-modules/ipython/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,30 @@
, requests
, simplegeneric
, traitlets
, prompt_toolkit
, prompt_toolkit_1
, pexpect
, appnope
}:

buildPythonPackage rec {
pname = "ipython";
version = "5.7.0";
version = "5.8.0";

src = fetchPypi {
inherit pname version;
sha256 = "0g1jm06qriq48m58311cs7askp83ipq3yq96hv4kg431nxzkmd4d";
sha256 = "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906";
};

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

patches = [
# improve cython support, needed by sage, accepted upstream
# https://github.com/ipython/ipython/pull/11139
(fetchpatch {
name = "signature-use-inspect.patch";
url = "https://github.com/ipython/ipython/commit/8d399b98d3ed5c765835594100c4d36fb2f739dc.patch";
sha256 = "1r7v9clwwbskmj4y160vcj6g0vzqbvnj4y1bm2n4bskafapm42g0";
})
];

buildInputs = [ glibcLocales ];

checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock;

propagatedBuildInputs = [
backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit
backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit_1
simplegeneric traitlets requests pathlib2 pexpect
] ++ lib.optionals stdenv.isDarwin [ appnope ];

Expand Down
17 changes: 5 additions & 12 deletions pkgs/development/python-modules/ipython/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@
, jedi
, decorator
, pickleshare
, simplegeneric
, traitlets
, prompt_toolkit
, pexpect
, appnope
, typing
, backcall
}:

buildPythonPackage rec {
pname = "ipython";
version = "6.5.0";
version = "7.1.1";
disabled = pythonOlder "3.5";

src = fetchPypi {
inherit pname version;
sha256 = "b0f2ef9eada4a68ef63ee10b6dde4f35c840035c50fd24265f8052c98947d5a4";
sha256 = "b10a7ddd03657c761fc503495bc36471c8158e3fc948573fb9fe82a7029d8efd";
};

prePatch = lib.optionalString stdenv.isDarwin ''
Expand All @@ -42,13 +41,12 @@ buildPythonPackage rec {
jedi
decorator
pickleshare
simplegeneric
traitlets
prompt_toolkit
pygments
pexpect
backcall
] ++ lib.optionals stdenv.isDarwin [appnope]
++ lib.optionals (pythonOlder "3.5") [ typing ];
] ++ lib.optionals stdenv.isDarwin [appnope];

LC_ALL="en_US.UTF-8";

Expand All @@ -58,11 +56,6 @@ buildPythonPackage rec {
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/;
Expand Down
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/jupyter_console/5.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, nose
, jupyter_client
, ipython
, ipykernel
, prompt_toolkit_1
, pygments
}:

buildPythonPackage rec {
pname = "jupyter_console";
version = "5.2.0";

src = fetchPypi {
inherit pname version;
sha256 = "545dedd3aaaa355148093c5609f0229aeb121b4852995c2accfa64fe3e0e55cd";
};

checkInputs = [ nose ];
propagatedBuildInputs = [
jupyter_client
ipython
ipykernel
prompt_toolkit_1
pygments
];

# ValueError: underlying buffer has been detached
doCheck = false;

meta = {
description = "Jupyter terminal console";
homepage = "http://jupyter.org/";
license = lib.licenses.bsd3;
};
}
9 changes: 5 additions & 4 deletions pkgs/development/python-modules/jupyter_console/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
, ipykernel
, prompt_toolkit
, pygments
, pythonOlder
}:

buildPythonPackage rec {
pname = "jupyter_console";
version = "5.2.0";
version = "6.0.0";
disabled = pythonOlder "3.5";

src = fetchPypi {
inherit pname version;
sha256 = "545dedd3aaaa355148093c5609f0229aeb121b4852995c2accfa64fe3e0e55cd";
sha256 = "308ce876354924fb6c540b41d5d6d08acfc946984bf0c97777c1ddcb42e0b2f5";
};

checkInputs = [ nose ];
Expand All @@ -34,6 +36,5 @@ buildPythonPackage rec {
description = "Jupyter terminal console";
homepage = "http://jupyter.org/";
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
};
}
}
26 changes: 14 additions & 12 deletions pkgs/development/python-modules/jupyterhub/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
, ipython
, jinja2
, python-oauth2
, prometheus_client
, async_generator
, pamela
, sqlalchemy
, tornado
Expand All @@ -18,27 +20,27 @@
let
# js/css assets that setup.py tries to fetch via `npm install` when building
# from source.
bootstrap =
bootstrap =
fetchzip {
url = "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz";
sha256 = "0r7s54bbf68ri1na9bbabyf12mcpb6zk5ja2q6z82aw1fa4xi3yd";
};
font-awesome =
font-awesome =
fetchzip {
url = "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz";
sha256 = "1xnxbdlfdd60z5ix152m8r2kk9dkwlqwpypky1mm3dv64ajnzdbk";
};
jquery =
jquery =
fetchzip {
url = "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz";
sha256 = "1j6y18miwzafdj8kfpwbmbn9qvgnbnpc7l4arqrhqj33m04xrlgi";
};
moment =
moment =
fetchzip {
url = "https://registry.npmjs.org/moment/-/moment-2.18.1.tgz";
sha256 = "1b4vyvs24v6y92pf2iqjm5aa7jg7khcpspn00girc7lpi917f9vw";
url = "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz";
sha256 = "12gb3p0rz5wyjwykv9g0pix7dd352lx1z7rzdjsf2brhwc4ffyip";
};
requirejs =
requirejs =
fetchzip {
url = "https://registry.npmjs.org/requirejs/-/requirejs-2.3.4.tgz";
sha256 = "0q6mkj0iv341kks06dya6lfs2kdw0n6vc7n4a7aa3ia530fk9vja";
Expand All @@ -48,11 +50,12 @@ in

buildPythonPackage rec {
pname = "jupyterhub";
version = "0.8.1";
version = "0.9.4";
disabled = pythonOlder "3.5";

src = fetchPypi {
inherit pname version;
sha256 = "100cf18d539802807a45450d38fefbb376cf1c810f3b1b31be31638829a5c69c";
sha256 = "7848bbb299536641a59eb1977ec3c7c95d931bace4a2803d7e9b28b9256714da";
};

# Most of this only applies when building from source (e.g. js/css assets are
Expand Down Expand Up @@ -103,14 +106,13 @@ buildPythonPackage rec {

propagatedBuildInputs = [
alembic ipython jinja2 pamela python-oauth2 requests sqlalchemy tornado
traitlets
traitlets prometheus_client async_generator
];

# Disable tests because they take an excessive amount of time to complete.
doCheck = false;

disabled = pythonOlder "3.4";


meta = with lib; {
description = "Serves multiple Jupyter notebook instances";
homepage = http://jupyter.org/;
Expand Down
21 changes: 12 additions & 9 deletions pkgs/development/python-modules/jupyterlab/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{ lib, buildPythonPackage, isPy3k, fetchPypi, ipython_genutils, jupyterlab_launcher, notebook }:
{ lib
, buildPythonPackage
, fetchPypi
, jupyterlab_server
, notebook
, pythonOlder
}:

buildPythonPackage rec {
pname = "jupyterlab";
version = "0.34.12";
disabled = !isPy3k;
version = "0.35.4";
disabled = pythonOlder "3.5";

src = fetchPypi {
inherit pname version;
sha256 = "7d8378d19a0ae173e91a493db996c37828b410b7ee556da21a153486168ecf87";
sha256 = "deba0b2803640fcad72c61366bff11d5945173015961586d5e3b2f629ffeb455";
};

propagatedBuildInputs = [
ipython_genutils
jupyterlab_launcher
notebook
];
propagatedBuildInputs = [ jupyterlab_server notebook ];

makeWrapperArgs = [
"--set" "JUPYTERLAB_DIR" "$out/share/jupyter/lab"
Expand Down
Loading