lol

Merge pull request #30762 from mayflower/jupyter-update

Update jupyter and enable a few tests

authored by

Frederik Rietdijk and committed by
GitHub
316f4ac9 6a768082

+156 -68
+38
pkgs/development/python-modules/jupyter_core/default.nix
··· 1 + { lib 2 + , python 3 + , buildPythonPackage 4 + , fetchPypi 5 + , ipython 6 + , traitlets 7 + , glibcLocales 8 + , mock 9 + , pytest 10 + }: 11 + 12 + buildPythonPackage rec { 13 + pname = "jupyter_core"; 14 + version = "4.3.0"; 15 + name = "${pname}-${version}"; 16 + 17 + src = fetchPypi { 18 + inherit pname version; 19 + sha256 = "a96b129e1641425bf057c3d46f4f44adce747a7d60107e8ad771045c36514d40"; 20 + }; 21 + 22 + buildInputs = [ pytest mock glibcLocales ]; 23 + propagatedBuildInputs = [ ipython traitlets ]; 24 + 25 + patches = [ ./tests_respect_pythonpath.patch ]; 26 + 27 + checkPhase = '' 28 + mkdir tmp 29 + HOME=tmp TMPDIR=tmp LC_ALL=en_US.utf8 py.test 30 + ''; 31 + 32 + meta = with lib; { 33 + description = "Jupyter core package. A base package on which Jupyter projects rely"; 34 + homepage = http://jupyter.org/; 35 + license = licenses.bsd3; 36 + maintainers = with maintainers; [ fridh globin ]; 37 + }; 38 + }
+24
pkgs/development/python-modules/jupyter_core/tests_respect_pythonpath.patch
··· 1 + --- a/jupyter_core/tests/test_command.py 2016-09-13 15:22:49.000000000 +0200 2 + +++ b/jupyter_core/tests/test_command.py 2017-10-23 12:49:27.489527705 +0200 3 + @@ -113,7 +113,10 @@ 4 + witness = a.join(witness_cmd) 5 + witness.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")')) 6 + witness.chmod(0o700) 7 + - out = check_output([sys.executable, str(jupyter), 'witness'], env={'PATH': ''}) 8 + + out = check_output( 9 + + [sys.executable, str(jupyter), 'witness'], 10 + + env={'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']} 11 + + ) 12 + assert b'WITNESS' in out 13 + 14 + 15 + @@ -136,5 +139,8 @@ 16 + witness_b.write('#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")')) 17 + witness_b.chmod(0o700) 18 + 19 + - out = check_output([sys.executable, str(jupyter), 'witness'], env={'PATH': str(b)}) 20 + + out = check_output( 21 + + [sys.executable, str(jupyter), 'witness'], 22 + + env={'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']} 23 + + ) 24 + assert b'WITNESS A' in out
+24
pkgs/development/python-modules/mistune/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , nose 5 + }: 6 + 7 + buildPythonPackage rec { 8 + pname = "mistune"; 9 + version = "0.7.4"; 10 + name = "${pname}-${version}"; 11 + 12 + src = fetchPypi { 13 + inherit pname version; 14 + sha256 = "0byj9jg9ly7karf5sb1aqcw7avaim9sxl8ws7yw7p1fibjgsy5w5"; 15 + }; 16 + 17 + buildInputs = [ nose ]; 18 + 19 + meta = with lib; { 20 + description = "The fastest markdown parser in pure Python"; 21 + homepage = https://github.com/lepture/mistune; 22 + license = licenses.bsd3; 23 + }; 24 + }
+7 -8
pkgs/development/python-modules/nbconvert/default.nix
··· 3 3 , fetchPypi 4 4 , pytest 5 5 , nose 6 + , glibcLocales 6 7 , entrypoints 7 8 , bleach 8 9 , mistune ··· 21 22 22 23 buildPythonPackage rec { 23 24 pname = "nbconvert"; 24 - version = "5.2.1"; 25 + version = "5.3.1"; 25 26 name = "${pname}-${version}"; 26 27 27 28 src = fetchPypi { 28 29 inherit pname version; 29 - sha256 = "9ed68ec7fe90a8672b43795b29ea91cc75ea355c83debc83ebd12171521ec274"; 30 + sha256 = "1f9dkvpx186xjm4xab0qbph588mncp4vqk3fmxrsnqs43mks9c8j"; 30 31 }; 31 32 32 - checkInputs = [ nose pytest ]; 33 + checkInputs = [ nose pytest glibcLocales ]; 33 34 34 35 propagatedBuildInputs = [ 35 36 entrypoints bleach mistune jinja2 pygments traitlets testpath ··· 37 38 ]; 38 39 39 40 checkPhase = '' 40 - nosetests -v 41 + mkdir tmp 42 + LC_ALL=en_US.utf8 HOME=`realpath tmp` py.test -v 41 43 ''; 42 44 43 - # PermissionError. Likely due to being in a chroot 44 - doCheck = false; 45 - 46 45 meta = { 47 46 description = "Converting Jupyter Notebooks"; 48 47 homepage = http://jupyter.org/; 49 48 license = lib.licenses.bsd3; 50 - maintainers = with lib.maintainers; [ fridh ]; 49 + maintainers = with lib.maintainers; [ fridh globin ]; 51 50 }; 52 51 }
+7 -4
pkgs/development/python-modules/nbformat/default.nix
··· 19 19 inherit pname version; 20 20 sha256 = "f7494ef0df60766b7cabe0a3651556345a963b74dbc16bc7c18479041170d402"; 21 21 }; 22 - LC_ALL="en_US.UTF-8"; 22 + 23 + LC_ALL="en_US.utf8"; 23 24 24 25 checkInputs = [ pytest glibcLocales ]; 25 26 propagatedBuildInputs = [ ipython_genutils traitlets testpath jsonschema jupyter_core ]; 26 27 27 - # Failing tests and permission issues 28 - doCheck = false; 28 + preCheck = '' 29 + mkdir tmp 30 + export HOME=tmp 31 + ''; 29 32 30 33 meta = { 31 34 description = "The Jupyter Notebook format"; 32 35 homepage = http://jupyter.org/; 33 36 license = lib.licenses.bsd3; 34 - maintainers = with lib.maintainers; [ fridh ]; 37 + maintainers = with lib.maintainers; [ fridh globin ]; 35 38 }; 36 39 }
+31
pkgs/development/python-modules/nose_warnings_filters/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , isPy3k 5 + , nose 6 + }: 7 + 8 + buildPythonPackage rec { 9 + pname = "nose_warnings_filters"; 10 + version = "0.1.5"; 11 + name = "${pname}-${version}"; 12 + 13 + src = fetchPypi { 14 + inherit pname version; 15 + sha256 = "17dvfqfy2fm7a5cmiffw2dc3064kpx72fn5mlw01skm2rhn5nv25"; 16 + }; 17 + 18 + disabled = !isPy3k; 19 + 20 + propagatedBuildInputs = [ nose ]; 21 + 22 + checkPhase = '' 23 + nosetests -v 24 + ''; 25 + 26 + meta = { 27 + description = "Allow injecting warning filters during nosetest"; 28 + homepage = https://github.com/Carreau/nose_warnings_filters; 29 + license = lib.licenses.mit; 30 + }; 31 + }
+21 -13
pkgs/development/python-modules/notebook/default.nix
··· 2 2 , buildPythonPackage 3 3 , fetchPypi 4 4 , nose 5 + , nose_warnings_filters 5 6 , glibcLocales 6 - , isPy27 7 + , isPy3k 7 8 , mock 8 9 , jinja2 9 10 , tornado ··· 21 22 22 23 buildPythonPackage rec { 23 24 pname = "notebook"; 24 - version = "5.0.0"; 25 + version = "5.2.0"; 25 26 name = "${pname}-${version}"; 26 27 27 28 src = fetchPypi { 28 29 inherit pname version; 29 - sha256 = "1cea3bbbd03c8e5842a1403347a8cc8134486b3ce081a2e5b1952a00ea66ed54"; 30 + sha256 = "1sh3jkkmjzv17c3r8ii3kfhpxi6dkjk846b2lfy71g9qwqdcvbvz"; 30 31 }; 31 32 32 - LC_ALL = "en_US.UTF-8"; 33 + LC_ALL = "en_US.utf8"; 33 34 34 - buildInputs = [nose glibcLocales] ++ lib.optionals isPy27 [mock]; 35 + buildInputs = [ nose glibcLocales ] 36 + ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]); 35 37 36 - propagatedBuildInputs = [jinja2 tornado ipython_genutils traitlets jupyter_core 37 - jupyter_client nbformat nbconvert ipykernel terminado requests pexpect ]; 38 + propagatedBuildInputs = [ 39 + jinja2 tornado ipython_genutils traitlets jupyter_core 40 + jupyter_client nbformat nbconvert ipykernel terminado requests pexpect 41 + ]; 38 42 43 + # disable warning_filters 44 + preCheck = lib.optionalString (!isPy3k) '' 45 + echo "" > setup.cfg 46 + cat setup.cfg 47 + ''; 39 48 checkPhase = '' 40 - nosetests -v 49 + runHook preCheck 50 + mkdir tmp 51 + HOME=tmp nosetests -v 41 52 ''; 42 53 43 - # Certain tests fail due to being in a chroot. 44 - # PermissionError 45 - doCheck = false; 46 54 meta = { 47 55 description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing"; 48 56 homepage = http://jupyter.org/; 49 57 license = lib.licenses.bsd3; 50 - maintainers = with lib.maintainers; [ fridh ]; 58 + maintainers = with lib.maintainers; [ fridh globin ]; 51 59 }; 52 - } 60 + }
+4 -43
pkgs/top-level/python-packages.nix
··· 10798 10798 10799 10799 jupyter_client = callPackage ../development/python-modules/jupyter_client { }; 10800 10800 10801 - jupyter_core = buildPythonPackage rec { 10802 - version = "4.3.0"; 10803 - name = "jupyter_core-${version}"; 10804 - 10805 - src = pkgs.fetchurl { 10806 - url = "mirror://pypi/j/jupyter_core/${name}.tar.gz"; 10807 - sha256 = "a96b129e1641425bf057c3d46f4f44adce747a7d60107e8ad771045c36514d40"; 10808 - }; 10809 - 10810 - buildInputs = with self; [ pytest mock ]; 10811 - propagatedBuildInputs = with self; [ ipython traitlets]; 10812 - 10813 - checkPhase = '' 10814 - py.test 10815 - ''; 10816 - 10817 - # Several tests fail due to being in a chroot 10818 - doCheck = false; 10819 - 10820 - meta = { 10821 - description = "Jupyter core package. A base package on which Jupyter projects rely"; 10822 - homepage = http://jupyter.org/; 10823 - license = licenses.bsd3; 10824 - maintainers = with maintainers; [ fridh ]; 10825 - }; 10826 - }; 10801 + jupyter_core = callPackage ../development/python-modules/jupyter_core { }; 10827 10802 10828 10803 jsonpath_rw = buildPythonPackage rec { 10829 10804 name = "jsonpath-rw-${version}"; ··· 11902 11877 }; 11903 11878 }; 11904 11879 11905 - mistune = buildPythonPackage rec { 11906 - version = "0.7.1"; 11907 - name = "mistune-${version}"; 11908 - 11909 - src = pkgs.fetchurl { 11910 - url = "mirror://pypi/m/mistune/${name}.tar.gz"; 11911 - sha256 = "6076dedf768348927d991f4371e5a799c6a0158b16091df08ee85ee231d929a7"; 11912 - }; 11913 - 11914 - buildInputs = with self; [nose]; 11915 - 11916 - meta = { 11917 - description = "The fastest markdown parser in pure Python"; 11918 - homepage = https://github.com/lepture/mistune; 11919 - license = licenses.bsd3; 11920 - }; 11921 - }; 11880 + mistune = callPackage ../development/python-modules/mistune { }; 11922 11881 11923 11882 brotlipy = buildPythonPackage rec { 11924 11883 name = "brotlipy-${version}"; ··· 13150 13109 13151 13110 buildInputs = with self; [ nose ]; 13152 13111 }; 13112 + 13113 + nose_warnings_filters = callPackage ../development/python-modules/nose_warnings_filters { }; 13153 13114 13154 13115 notebook = callPackage ../development/python-modules/notebook { }; 13155 13116