From b189f7e76c5f6d9903e1f56e2f0631aa768e4976 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Sep 2021 18:29:23 -0700 Subject: [PATCH 01/12] build/pkgs/jupyterlab: Update to 3.1.x --- build/pkgs/jupyterlab/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/jupyterlab/requirements.txt b/build/pkgs/jupyterlab/requirements.txt index 971a1cf8b05..2c6aa03d190 100644 --- a/build/pkgs/jupyterlab/requirements.txt +++ b/build/pkgs/jupyterlab/requirements.txt @@ -1 +1 @@ -jupyterlab ~= 2.2.5 +jupyterlab ~= 3.1 From 625afa6b4c5c05a8d37e266e0e40c04a99ae46e7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Sep 2021 18:47:01 -0700 Subject: [PATCH 02/12] build/pkgs/jupyterlab/dependencies: Add missing deps --- build/pkgs/jupyterlab/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/jupyterlab/dependencies b/build/pkgs/jupyterlab/dependencies index 873767864f2..463f6e9d917 100644 --- a/build/pkgs/jupyterlab/dependencies +++ b/build/pkgs/jupyterlab/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) vcversioner jupyter_core jupyter_client | $(PYTHON_TOOLCHAIN) +$(PYTHON) vcversioner jupyter_core jupyter_client jinja2 tornado ipython packaging terminado traitlets nbconvert send2trash nbformat prometheus_client ipython_genutils argon2_cffi pyzmq idna requests jsonschema babel notebook | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. From fd8efe00d5eb94071d52c60048fca9d8d53262d7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Mar 2022 16:31:05 -0800 Subject: [PATCH 03/12] build/pkgs/jupyterlab: Update to ~= 3.3 --- build/pkgs/jupyterlab/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/jupyterlab/requirements.txt b/build/pkgs/jupyterlab/requirements.txt index 2c6aa03d190..5f4f9559dea 100644 --- a/build/pkgs/jupyterlab/requirements.txt +++ b/build/pkgs/jupyterlab/requirements.txt @@ -1 +1 @@ -jupyterlab ~= 3.1 +jupyterlab ~= 3.3 From 3ae6292c61d542ace1448de713a913add0d4205e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Mar 2022 16:42:03 -0800 Subject: [PATCH 04/12] build/pkgs/jupyterlab_widgets: Switch it to a pip package --- build/pkgs/jupyterlab_widgets/dependencies | 3 +-- .../jupyterlab_widgets/package-version.txt | 2 +- .../pkgs/jupyterlab_widgets/requirements.txt | 1 + build/pkgs/jupyterlab_widgets/spkg-install | 19 ------------------- 4 files changed, 3 insertions(+), 22 deletions(-) create mode 100644 build/pkgs/jupyterlab_widgets/requirements.txt delete mode 100755 build/pkgs/jupyterlab_widgets/spkg-install diff --git a/build/pkgs/jupyterlab_widgets/dependencies b/build/pkgs/jupyterlab_widgets/dependencies index 07346c2ff1a..593da1a5d1b 100644 --- a/build/pkgs/jupyterlab_widgets/dependencies +++ b/build/pkgs/jupyterlab_widgets/dependencies @@ -1,5 +1,4 @@ -jupyterlab nodejs tornado +jupyterlab nodejs tornado $(PYTHON) | $(PYTHON_TOOLCHAIN) jupyter_packaging ---------- All lines of this file are ignored except the first. -It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/jupyterlab_widgets/package-version.txt b/build/pkgs/jupyterlab_widgets/package-version.txt index cd5ac039d67..6d7de6e6abe 100644 --- a/build/pkgs/jupyterlab_widgets/package-version.txt +++ b/build/pkgs/jupyterlab_widgets/package-version.txt @@ -1 +1 @@ -2.0 +1.0.2 diff --git a/build/pkgs/jupyterlab_widgets/requirements.txt b/build/pkgs/jupyterlab_widgets/requirements.txt new file mode 100644 index 00000000000..0800dc09838 --- /dev/null +++ b/build/pkgs/jupyterlab_widgets/requirements.txt @@ -0,0 +1 @@ +jupyterlab-widgets diff --git a/build/pkgs/jupyterlab_widgets/spkg-install b/build/pkgs/jupyterlab_widgets/spkg-install deleted file mode 100755 index 9376882aaa0..00000000000 --- a/build/pkgs/jupyterlab_widgets/spkg-install +++ /dev/null @@ -1,19 +0,0 @@ -if [ -z "$SAGE_LOCAL" ]; then - echo >&2 "SAGE_LOCAL undefined ... exiting" - echo >&2 "Maybe run 'sage --sh'?" - exit 1 -fi - -widgets_ver=`cat package-version.txt` - -if [ $? -ne 0 ]; then - echo "Error determining which jupyter-widgets version to install ... exiting" - exit 1 -fi - -jupyter labextension install "@jupyter-widgets/jupyterlab-manager@$widgets_ver" - -if [ $? -ne 0 ]; then - echo "Error installing jupyter-widgets extension into jupyterlab ... exiting" - exit 1 -fi From ba44b3e64b2a5d5363c19f3c658f3dd7da3826b8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Mar 2022 16:42:38 -0800 Subject: [PATCH 05/12] build/pkgs/jupyter_packaging: Update to 0.11.1 --- build/pkgs/jupyter_packaging/checksums.ini | 6 +++--- build/pkgs/jupyter_packaging/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/jupyter_packaging/checksums.ini b/build/pkgs/jupyter_packaging/checksums.ini index 26572ef4db1..807bffaf69d 100644 --- a/build/pkgs/jupyter_packaging/checksums.ini +++ b/build/pkgs/jupyter_packaging/checksums.ini @@ -1,5 +1,5 @@ tarball=jupyter-packaging-VERSION.tar.gz -sha1=4ef13ad7b39a15d7315209d3703db4409976140d -md5=b56e58fb5d9e79af0867bb450f3e9478 -cksum=762335949 +sha1=298ad31fb2acd9fa3f34aff9e2ccc8ef5de1076a +md5=6d39c1382acccdc5dd85ce5702c9ef8f +cksum=372068937 upstream_url=https://pypi.io/packages/source/j/jupyter_packaging/jupyter-packaging-VERSION.tar.gz diff --git a/build/pkgs/jupyter_packaging/package-version.txt b/build/pkgs/jupyter_packaging/package-version.txt index 88a7b228577..af88ba82486 100644 --- a/build/pkgs/jupyter_packaging/package-version.txt +++ b/build/pkgs/jupyter_packaging/package-version.txt @@ -1 +1 @@ -0.7.12 +0.11.1 From cd70e9b74005a49e11b7f72bdc5d2e58e0ec87da Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Mar 2022 16:43:15 -0800 Subject: [PATCH 06/12] build/pkgs/ipympl: Update to 0.8.8 --- build/pkgs/ipympl/checksums.ini | 6 +++--- build/pkgs/ipympl/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/ipympl/checksums.ini b/build/pkgs/ipympl/checksums.ini index 5d0dfd79a71..d67f1362d12 100644 --- a/build/pkgs/ipympl/checksums.ini +++ b/build/pkgs/ipympl/checksums.ini @@ -1,5 +1,5 @@ tarball=ipympl-VERSION.tar.gz -sha1=c3f810f31a3f1ae0c7c4719f7e94fc22b4c35829 -md5=aaa01fdd190df932944ea1224adc1360 -cksum=1460657301 +sha1=6bccdb8c1801f1babfe0504fb21359f7a43fcbfc +md5=7ee429dc01e92522b5b3c6131e31a7d3 +cksum=3626243657 upstream_url=https://pypi.io/packages/source/i/ipympl/ipympl-VERSION.tar.gz diff --git a/build/pkgs/ipympl/package-version.txt b/build/pkgs/ipympl/package-version.txt index faef31a4357..6201b5f77f5 100644 --- a/build/pkgs/ipympl/package-version.txt +++ b/build/pkgs/ipympl/package-version.txt @@ -1 +1 @@ -0.7.0 +0.8.8 From 180993c9e4143af67f6a094dffb1be1efaa69473 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 4 Mar 2022 16:44:25 -0800 Subject: [PATCH 07/12] build/pkgs/jupyterlab_widgets/dependencies: Add ipympl --- build/pkgs/jupyterlab_widgets/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/jupyterlab_widgets/dependencies b/build/pkgs/jupyterlab_widgets/dependencies index 593da1a5d1b..4d2deddc8bf 100644 --- a/build/pkgs/jupyterlab_widgets/dependencies +++ b/build/pkgs/jupyterlab_widgets/dependencies @@ -1,4 +1,4 @@ -jupyterlab nodejs tornado $(PYTHON) | $(PYTHON_TOOLCHAIN) jupyter_packaging +ipympl jupyterlab nodejs tornado $(PYTHON) | $(PYTHON_TOOLCHAIN) jupyter_packaging ---------- All lines of this file are ignored except the first. From d86c38aea029e016c04b196107bc2f37dce5ef80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 10:05:28 -0800 Subject: [PATCH 08/12] build/pkgs/jupyter_packaging/checksums.ini: Fix tarball name --- build/pkgs/jupyter_packaging/checksums.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/jupyter_packaging/checksums.ini b/build/pkgs/jupyter_packaging/checksums.ini index 807bffaf69d..2d0c8df95c0 100644 --- a/build/pkgs/jupyter_packaging/checksums.ini +++ b/build/pkgs/jupyter_packaging/checksums.ini @@ -1,5 +1,5 @@ -tarball=jupyter-packaging-VERSION.tar.gz +tarball=jupyter_packaging-VERSION.tar.gz sha1=298ad31fb2acd9fa3f34aff9e2ccc8ef5de1076a md5=6d39c1382acccdc5dd85ce5702c9ef8f cksum=372068937 -upstream_url=https://pypi.io/packages/source/j/jupyter_packaging/jupyter-packaging-VERSION.tar.gz +upstream_url=https://pypi.io/packages/source/j/jupyter_packaging/jupyter_packaging-VERSION.tar.gz From 780516f0d090891a4e3013dead8063e8e518e238 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 10:59:09 -0800 Subject: [PATCH 09/12] sage -n nbclassic: New --- src/bin/sage-notebook | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook index ff7525c275c..d3cb5e2ddf8 100755 --- a/src/bin/sage-notebook +++ b/src/bin/sage-notebook @@ -72,6 +72,35 @@ class NotebookJupyterlab(object): main(argv) +class NotebookNbclassic(object): + def print_banner(self): + banner() + print('Please wait while the Jupyterlab server starts...') + + @classmethod + def print_help(cls): + cls(['help']) + + def __init__(self, argv): + try: + from nbclassic.notebookapp import main + except ImportError: + import traceback + traceback.print_exc() + print("Jupyterlab is not installed (at least not in this Sage installation).") + print("You can install it by running") + print(" sage -i jupyterlab_widgets") + print("which includes support for interacts and the ability to download and") + print("install other Jupyterlab extensions. For a minimal installation, run") + print(" sage -i jupyterlab") + print("Alternatively, you can follow the instructions at") + print(" " + _system_jupyter_url) + print("to use Sage with an existing Jupyterlab installation.") + raise SystemExit(1) + self.print_banner() + main(argv) + + class SageNBExport(NotebookJupyter): def print_banner(self): @@ -138,6 +167,7 @@ notebook_launcher = { 'ipython': NotebookJupyter, 'jupyter': NotebookJupyter, 'jupyterlab': NotebookJupyterlab, + 'nbclassic': NotebookNbclassic, 'export': SageNBExport, } From 54268888bb13650239f7c84ff39d7f51cbab1e17 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 11:06:03 -0800 Subject: [PATCH 10/12] build/pkgs/retrolab: New --- build/pkgs/retrolab/SPKG.rst | 16 ++++++++++++++++ build/pkgs/retrolab/dependencies | 4 ++++ build/pkgs/retrolab/requirements.txt | 1 + build/pkgs/retrolab/type | 1 + 4 files changed, 22 insertions(+) create mode 100644 build/pkgs/retrolab/SPKG.rst create mode 100644 build/pkgs/retrolab/dependencies create mode 100644 build/pkgs/retrolab/requirements.txt create mode 100644 build/pkgs/retrolab/type diff --git a/build/pkgs/retrolab/SPKG.rst b/build/pkgs/retrolab/SPKG.rst new file mode 100644 index 00000000000..b2d68eac755 --- /dev/null +++ b/build/pkgs/retrolab/SPKG.rst @@ -0,0 +1,16 @@ +retrolab: JupyterLab Distribution with a retro look and feel +============================================================ + +Description +----------- + +JupyterLab Distribution with a retro look and feel + +License +------- + +Upstream Contact +---------------- + +https://pypi.org/project/retrolab/ + diff --git a/build/pkgs/retrolab/dependencies b/build/pkgs/retrolab/dependencies new file mode 100644 index 00000000000..531f28310be --- /dev/null +++ b/build/pkgs/retrolab/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) jupyterlab | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/retrolab/requirements.txt b/build/pkgs/retrolab/requirements.txt new file mode 100644 index 00000000000..059cd874f5d --- /dev/null +++ b/build/pkgs/retrolab/requirements.txt @@ -0,0 +1 @@ +retrolab ~= 0.3 diff --git a/build/pkgs/retrolab/type b/build/pkgs/retrolab/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/retrolab/type @@ -0,0 +1 @@ +optional From efc92cd43e309e3e94252f2344076500eecbc2ab Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 11:06:12 -0800 Subject: [PATCH 11/12] sage -n retrolab: New --- src/bin/sage-notebook | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook index d3cb5e2ddf8..1e68effa4c0 100755 --- a/src/bin/sage-notebook +++ b/src/bin/sage-notebook @@ -93,9 +93,32 @@ class NotebookNbclassic(object): print("which includes support for interacts and the ability to download and") print("install other Jupyterlab extensions. For a minimal installation, run") print(" sage -i jupyterlab") - print("Alternatively, you can follow the instructions at") - print(" " + _system_jupyter_url) - print("to use Sage with an existing Jupyterlab installation.") + raise SystemExit(1) + self.print_banner() + main(argv) + + +class NotebookRetrolab(object): + def print_banner(self): + banner() + print('Please wait while the Jupyterlab server starts...') + + @classmethod + def print_help(cls): + cls(['help']) + + def __init__(self, argv): + try: + from retrolab.app import main + except ImportError: + import traceback + traceback.print_exc() + print("Retrolab is not installed (at least not in this Sage installation).") + print("You can install it by running") + print(" sage -i jupyterlab_widgets retrolab") + print("which includes support for interacts and the ability to download and") + print("install other Jupyterlab extensions. For a minimal installation, run") + print(" sage -i retrolab") raise SystemExit(1) self.print_banner() main(argv) @@ -168,9 +191,11 @@ notebook_launcher = { 'jupyter': NotebookJupyter, 'jupyterlab': NotebookJupyterlab, 'nbclassic': NotebookNbclassic, + 'retrolab': NotebookRetrolab, 'export': SageNBExport, } + notebook_names = ', '.join(notebook_launcher.keys()) From 1243bd895a378550cd305d48bc4f87b3171f0f32 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 14:02:01 -0800 Subject: [PATCH 12/12] build/pkgs/{jupyter_packaging,ipympl}: Reduce to pip packages --- build/pkgs/ipympl/checksums.ini | 5 ----- build/pkgs/ipympl/package-version.txt | 1 - build/pkgs/ipympl/requirements.txt | 1 + build/pkgs/ipympl/spkg-install.in | 2 -- build/pkgs/jupyter_packaging/checksums.ini | 5 ----- build/pkgs/jupyter_packaging/dependencies | 2 +- build/pkgs/jupyter_packaging/package-version.txt | 1 - build/pkgs/jupyter_packaging/requirements.txt | 1 + build/pkgs/jupyter_packaging/spkg-install.in | 2 -- build/pkgs/jupyterlab_widgets/package-version.txt | 1 - 10 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 build/pkgs/ipympl/checksums.ini delete mode 100644 build/pkgs/ipympl/package-version.txt create mode 100644 build/pkgs/ipympl/requirements.txt delete mode 100644 build/pkgs/ipympl/spkg-install.in delete mode 100644 build/pkgs/jupyter_packaging/checksums.ini delete mode 100644 build/pkgs/jupyter_packaging/package-version.txt create mode 100644 build/pkgs/jupyter_packaging/requirements.txt delete mode 100644 build/pkgs/jupyter_packaging/spkg-install.in delete mode 100644 build/pkgs/jupyterlab_widgets/package-version.txt diff --git a/build/pkgs/ipympl/checksums.ini b/build/pkgs/ipympl/checksums.ini deleted file mode 100644 index d67f1362d12..00000000000 --- a/build/pkgs/ipympl/checksums.ini +++ /dev/null @@ -1,5 +0,0 @@ -tarball=ipympl-VERSION.tar.gz -sha1=6bccdb8c1801f1babfe0504fb21359f7a43fcbfc -md5=7ee429dc01e92522b5b3c6131e31a7d3 -cksum=3626243657 -upstream_url=https://pypi.io/packages/source/i/ipympl/ipympl-VERSION.tar.gz diff --git a/build/pkgs/ipympl/package-version.txt b/build/pkgs/ipympl/package-version.txt deleted file mode 100644 index 6201b5f77f5..00000000000 --- a/build/pkgs/ipympl/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -0.8.8 diff --git a/build/pkgs/ipympl/requirements.txt b/build/pkgs/ipympl/requirements.txt new file mode 100644 index 00000000000..d715db054cd --- /dev/null +++ b/build/pkgs/ipympl/requirements.txt @@ -0,0 +1 @@ +ipympl diff --git a/build/pkgs/ipympl/spkg-install.in b/build/pkgs/ipympl/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/ipympl/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . diff --git a/build/pkgs/jupyter_packaging/checksums.ini b/build/pkgs/jupyter_packaging/checksums.ini deleted file mode 100644 index 2d0c8df95c0..00000000000 --- a/build/pkgs/jupyter_packaging/checksums.ini +++ /dev/null @@ -1,5 +0,0 @@ -tarball=jupyter_packaging-VERSION.tar.gz -sha1=298ad31fb2acd9fa3f34aff9e2ccc8ef5de1076a -md5=6d39c1382acccdc5dd85ce5702c9ef8f -cksum=372068937 -upstream_url=https://pypi.io/packages/source/j/jupyter_packaging/jupyter_packaging-VERSION.tar.gz diff --git a/build/pkgs/jupyter_packaging/dependencies b/build/pkgs/jupyter_packaging/dependencies index 91a41b84d7d..0738c2d7777 100644 --- a/build/pkgs/jupyter_packaging/dependencies +++ b/build/pkgs/jupyter_packaging/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) packaging | $(PYTHON_TOOLCHAIN) +$(PYTHON) | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/jupyter_packaging/package-version.txt b/build/pkgs/jupyter_packaging/package-version.txt deleted file mode 100644 index af88ba82486..00000000000 --- a/build/pkgs/jupyter_packaging/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -0.11.1 diff --git a/build/pkgs/jupyter_packaging/requirements.txt b/build/pkgs/jupyter_packaging/requirements.txt new file mode 100644 index 00000000000..b5ec61b7d14 --- /dev/null +++ b/build/pkgs/jupyter_packaging/requirements.txt @@ -0,0 +1 @@ +jupyter-packaging diff --git a/build/pkgs/jupyter_packaging/spkg-install.in b/build/pkgs/jupyter_packaging/spkg-install.in deleted file mode 100644 index 37ac1a53437..00000000000 --- a/build/pkgs/jupyter_packaging/spkg-install.in +++ /dev/null @@ -1,2 +0,0 @@ -cd src -sdh_pip_install . diff --git a/build/pkgs/jupyterlab_widgets/package-version.txt b/build/pkgs/jupyterlab_widgets/package-version.txt deleted file mode 100644 index 6d7de6e6abe..00000000000 --- a/build/pkgs/jupyterlab_widgets/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.2