From ebec4b7cef0d4e333fa62ec3ea6c6bca8ff5f6ea Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Thu, 23 May 2024 11:45:49 +0200 Subject: [PATCH 1/2] adding easyconfigs: JupyterLab-4.2.0-GCCcore-13.2.0.eb, JupyterNotebook-7.2.0-GCCcore-13.2.0.eb, jupyter-server-2.14.0-GCCcore-13.2.0.eb and patches: jupyter-core-5.7.2_fix_jupyter_path.patch --- .../JupyterLab-4.2.0-GCCcore-13.2.0.eb | 78 ++++++++ .../JupyterNotebook-7.2.0-GCCcore-13.2.0.eb | 42 ++++ .../jupyter-core-5.7.2_fix_jupyter_path.patch | 32 +++ .../jupyter-server-2.14.0-GCCcore-13.2.0.eb | 185 ++++++++++++++++++ 4 files changed, 337 insertions(+) create mode 100644 easybuild/easyconfigs/j/JupyterLab/JupyterLab-4.2.0-GCCcore-13.2.0.eb create mode 100644 easybuild/easyconfigs/j/JupyterNotebook/JupyterNotebook-7.2.0-GCCcore-13.2.0.eb create mode 100644 easybuild/easyconfigs/j/jupyter-server/jupyter-core-5.7.2_fix_jupyter_path.patch create mode 100644 easybuild/easyconfigs/j/jupyter-server/jupyter-server-2.14.0-GCCcore-13.2.0.eb diff --git a/easybuild/easyconfigs/j/JupyterLab/JupyterLab-4.2.0-GCCcore-13.2.0.eb b/easybuild/easyconfigs/j/JupyterLab/JupyterLab-4.2.0-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..8410c3f15b8 --- /dev/null +++ b/easybuild/easyconfigs/j/JupyterLab/JupyterLab-4.2.0-GCCcore-13.2.0.eb @@ -0,0 +1,78 @@ +easyblock = 'PythonBundle' + +name = 'JupyterLab' +version = '4.2.0' + +homepage = 'https://jupyter.org/' +description = """JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar + building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, + etc.) in a flexible and powerful user interface. JupyterLab will eventually replace the classic Jupyter + Notebook.""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +builddependencies = [ + ('binutils', '2.40'), + ('hatch-jupyter-builder', '0.9.1'), +] +dependencies = [ + ('Python', '3.11.5'), + ('IPython', '8.17.2'), + ('jupyter-server', '2.14.0'), +] + +use_pip = True +sanity_pip_check = True + +exts_list = [ + ('json5', '0.9.25', { + 'checksums': ['548e41b9be043f9426776f05df8635a00fe06104ea51ed24b67f908856e151ae'], + }), + ('jupyterlab_server', '2.27.1', { + 'checksums': ['097b5ac709b676c7284ac9c5e373f11930a561f52cd5a86e4fc7e5a9c8a8631d'], + }), + ('jupyter-lsp', '2.2.5', { + 'checksums': ['793147a05ad446f809fd53ef1cd19a9f5256fd0a2d6b7ce943a982cb4f545001'], + }), + ('async-lru', '2.0.4', { + 'checksums': ['b8a59a5df60805ff63220b2a0c5b5393da5521b113cd5465a44eb037d81a5627'], + }), + ('h11', '0.14.0', { + 'checksums': ['8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d'], + }), + ('httpcore', '1.0.5', { + 'checksums': ['34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61'], + }), + ('httpx', '0.27.0', { + 'checksums': ['a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5'], + }), + ('jupyterlab', version, { + 'checksums': ['356e9205a6a2ab689c47c8fe4919dba6c076e376d03f26baadc05748c2435dd5'], + }), +] + +sanity_check_paths = { + 'files': ['bin/jupyter-lab', 'bin/jupyter-labextension', 'bin/jupyter-labhub'], + 'dirs': ['etc/jupyter', 'share/jupyter'], +} + +sanity_check_commands = ['jupyter lab --help'] + +modextrapaths = {'EB_ENV_JUPYTER_ROOT': ''} +modextravars = { + # only one path allowed as JUPYTERLAB_DIR + 'JUPYTERLAB_DIR': '%(installdir)s/share/jupyter/lab', +} + +# keep user's configuration in their home directory +# note: '~' is not expanded by JupyterLab +modluafooter = """ +setenv("JUPYTERLAB_SETTINGS_DIR", pathJoin(os.getenv("HOME"), ".jupyter", "lab", "user-settings")) +setenv("JUPYTERLAB_WORKSPACES_DIR", pathJoin(os.getenv("HOME"), ".jupyter", "lab", "workspaces")) +""" +modtclfooter = """ +setenv JUPYTERLAB_SETTINGS_DIR "$::env(HOME)/.jupyter/lab/user-settings" +setenv JUPYTERLAB_WORKSPACES_DIR "$::env(HOME)/.jupyter/lab/workspaces" +""" + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/j/JupyterNotebook/JupyterNotebook-7.2.0-GCCcore-13.2.0.eb b/easybuild/easyconfigs/j/JupyterNotebook/JupyterNotebook-7.2.0-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..a391a9329e2 --- /dev/null +++ b/easybuild/easyconfigs/j/JupyterNotebook/JupyterNotebook-7.2.0-GCCcore-13.2.0.eb @@ -0,0 +1,42 @@ +easyblock = 'PythonPackage' + +name = 'JupyterNotebook' +version = '7.2.0' + +homepage = 'https://jupyter.org/' +description = """The Jupyter Notebook is the original web application for creating and + sharing computational documents. It offers a simple, streamlined, document-centric experience.""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +source_urls = ['https://pypi.python.org/packages/source/n/notebook'] +sources = ['notebook-%(version)s.tar.gz'] +checksums = ['34a2ba4b08ad5d19ec930db7484fb79746a1784be9e1a5f8218f9af8656a141f'] + +builddependencies = [ + ('binutils', '2.40'), + ('hatch-jupyter-builder', '0.9.1'), +] +dependencies = [ + ('Python', '3.11.5'), + ('IPython', '8.17.2'), + ('jupyter-server', '2.14.0'), + ('JupyterLab', '4.2.0'), +] + +download_dep_fail = True +sanity_pip_check = True +use_pip = True + +options = {'modulename': 'notebook'} + +sanity_check_paths = { + 'files': ['bin/jupyter-notebook'], + 'dirs': ['etc/jupyter', 'share/jupyter'], +} + +sanity_check_commands = ['jupyter notebook --help'] + +modextrapaths = {'EB_ENV_JUPYTER_ROOT': ''} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/j/jupyter-server/jupyter-core-5.7.2_fix_jupyter_path.patch b/easybuild/easyconfigs/j/jupyter-server/jupyter-core-5.7.2_fix_jupyter_path.patch new file mode 100644 index 00000000000..04788ab7eb6 --- /dev/null +++ b/easybuild/easyconfigs/j/jupyter-server/jupyter-core-5.7.2_fix_jupyter_path.patch @@ -0,0 +1,32 @@ +# Patch jupyter_core to help jupyter find the correct installation path. +# +# If jupyter is installed by EasyBuild, jupyter is not in the same place as python. +# `EB_ENV_JUPYTER_ROOT` is used to indicate where jupyter are and should be set to +# the instllation path in easyconfigs. +# Avoid using `ENV_JUPYTER_PATH` and `ENV_CONFIG_PATH`. Otherwise user configuration +# has lower priority and cannot save their own settings. +# Author: Chia-Jung Hsu, 2024-01-31 +--- a/jupyter_core/paths.py ++++ b/jupyter_core/paths.py +@@ -228,6 +228,10 @@ + + ENV_JUPYTER_PATH: list[str] = [str(Path(sys.prefix, "share", "jupyter"))] + ++if os.environ.get("EB_ENV_JUPYTER_ROOT"): ++ EB_ENV_JUPYTER_ROOT = [p.rstrip(os.sep) for p in os.environ["EB_ENV_JUPYTER_ROOT"].split(os.pathsep)] ++ ENV_JUPYTER_PATH = [str(Path(p, "share", "jupyter")) for p in EB_ENV_JUPYTER_ROOT] ++ + + def jupyter_path(*subdirs: str) -> list[str]: + """Return a list of directories to search for data files +@@ -306,6 +310,10 @@ + ] + ENV_CONFIG_PATH: list[str] = [str(Path(sys.prefix, "etc", "jupyter"))] + ++if os.environ.get("EB_ENV_JUPYTER_ROOT"): ++ EB_ENV_JUPYTER_ROOT = [p.rstrip(os.sep) for p in os.environ["EB_ENV_JUPYTER_ROOT"].split(os.pathsep)] ++ ENV_CONFIG_PATH = [str(Path(p, "etc", "jupyter")) for p in EB_ENV_JUPYTER_ROOT] ++ + + def jupyter_config_path() -> list[str]: + """Return the search path for Jupyter config files as a list. diff --git a/easybuild/easyconfigs/j/jupyter-server/jupyter-server-2.14.0-GCCcore-13.2.0.eb b/easybuild/easyconfigs/j/jupyter-server/jupyter-server-2.14.0-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..ee8dfa23154 --- /dev/null +++ b/easybuild/easyconfigs/j/jupyter-server/jupyter-server-2.14.0-GCCcore-13.2.0.eb @@ -0,0 +1,185 @@ +easyblock = 'PythonBundle' + +name = 'jupyter-server' +version = "2.14.0" + +homepage = 'https://jupyter.org/' +description = """The Jupyter Server provides the backend (i.e. the core services, APIs, and REST +endpoints) for Jupyter web applications like Jupyter notebook, JupyterLab, and +Voila.""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +builddependencies = [ + ('binutils', '2.40'), + ('maturin', '1.3.1'), # needed by rpds_py + ('hatch-jupyter-builder', '0.9.1'), +] +dependencies = [ + ('Python', '3.11.5'), + ('IPython', '8.17.2'), + ('PyYAML', '6.0.1'), + ('PyZMQ', '25.1.2'), + ('tornado', '6.4'), + ('BeautifulSoup', '4.12.2'), # needed by nbconvert +] + +sanity_pip_check = True +use_pip = True + +# WARNING: the versions of ipywidgets, widgetsnbextension and jupyterlab_widgets are tied between them +# use the versions published in a single release commit instead of blindly pushing to last available version, +# see for instance https://github.com/jupyter-widgets/ipywidgets/commit/b728926f58ed3ffef08f716998ac6c226dafc1aa + +exts_list = [ + ('websocket_client', '1.8.0', { + 'modulename': 'websocket', + 'checksums': ['3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da'], + }), + ('terminado', '0.18.1', { + 'checksums': ['de09f2c4b85de4765f7714688fff57d3e75bad1f909b589fde880460c753fd2e'], + }), + ('Send2Trash', '1.8.3', { + 'checksums': ['b18e7a3966d99871aefeb00cfbcfdced55ce4871194810fc71f4aa484b953abf'], + }), + ('prometheus_client', '0.20.0', { + 'checksums': ['287629d00b147a32dcb2be0b9df905da599b2d82f80377083ec8463309a4bb89'], + }), + ('overrides', '7.7.0', { + 'checksums': ['55158fa3d93b98cc75299b1e67078ad9003ca27945c76162c1c0766d6f91820a'], + }), + ('jupyter_core', '5.7.2', { + 'patches': ['jupyter-core-%(version)s_fix_jupyter_path.patch'], + 'checksums': [ + {'jupyter_core-5.7.2.tar.gz': 'aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9'}, + {'jupyter-core-5.7.2_fix_jupyter_path.patch': + '1ed5088728c1ad49687b66e31ed23965c36645ad285693785b2b96c4ff1b2f93'}, + ], + }), + ('fastjsonschema', '2.19.1', { + 'checksums': ['e3126a94bdc4623d3de4485f8d468a12f02a67921315ddc87836d6e456dc789d'], + }), + ('tinycss2', '1.3.0', { + 'checksums': ['152f9acabd296a8375fbca5b84c961ff95971fcfc32e79550c8df8e29118c54d'], + }), + ('pandocfilters', '1.5.1', { + 'checksums': ['002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e'], + }), + ('mistune', '3.0.2', { + 'checksums': ['fc7f93ded930c92394ef2cb6f04a8aabab4117a91449e72dcc8dfa646a508be8'], + }), + ('deprecation', '2.1.0', { + 'checksums': ['72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff'], + }), + ('jupyter_packaging', '0.12.3', { + 'checksums': ['9d9b2b63b97ffd67a8bc5391c32a421bc415b264a32c99e4d8d8dd31daae9cf4'], + }), + ('jupyterlab_pygments', '0.3.0', { + 'checksums': ['721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d'], + }), + ('defusedxml', '0.7.1', { + 'checksums': ['1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69'], + }), + ('bleach', '6.1.0', { + 'checksums': ['0a31f1837963c41d46bbf1331b8778e1308ea0791db03cc4e7357b97cf42a8fe'], + }), + ('nbformat', '5.10.4', { + 'checksums': ['322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a'], + }), + ('nbclient', '0.10.0', { + 'checksums': ['4b3f1b7dba531e498449c4db4f53da339c91d449dc11e9af3a43b4eb5c5abb09'], + }), + ('jupyter_client', '8.6.1', { + 'checksums': ['e842515e2bab8e19186d89fdfea7abd15e39dd581f94e399f00e2af5a1652d3f'], + }), + ('nbconvert', '7.16.4', { + 'checksums': ['86ca91ba266b0a448dc96fa6c5b9d98affabde2867b363258703536807f9f7f4'], + }), + ('jupyter_server_terminals', '0.5.3', { + 'checksums': ['5ae0295167220e9ace0edcfdb212afd2b01ee8d179fe6f23c899590e9b8a5269'], + }), + ('rfc3986_validator', '0.1.1', { + 'checksums': ['3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055'], + }), + ('rfc3339_validator', '0.1.4', { + 'checksums': ['138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b'], + }), + ('rpds_py', '0.18.1', { + 'modulename': 'rpds', + 'checksums': ['dc48b479d540770c811fbd1eb9ba2bb66951863e448efec2e2c102625328e92f'], + }), + ('referencing', '0.35.1', { + 'checksums': ['25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c'], + }), + ('python-json-logger', '2.0.7', { + 'modulename': 'pythonjsonlogger', + 'checksums': ['23e7ec02d34237c5aa1e29a070193a4ea87583bb4e7f8fd06d3de8264c4b2e1c'], + }), + ('jsonschema_specifications', '2023.12.1', { + 'checksums': ['48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc'], + }), + ('jsonschema', '4.22.0', { + 'checksums': ['5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7'], + }), + ('jupyter_events', '0.10.0', { + 'checksums': ['670b8229d3cc882ec782144ed22e0d29e1c2d639263f92ca8383e66682845e22'], + }), + ('argon2-cffi-bindings', '21.2.0', { + 'modulename': '_argon2_cffi_bindings', + 'checksums': ['bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3'], + }), + ('argon2_cffi', '23.1.0', { + 'modulename': 'argon2', + 'checksums': ['879c3e79a2729ce768ebb7d36d4609e3a78a4ca2ec3a9f12286ca057e3d0db08'], + }), + ('sniffio', '1.3.1', { + 'checksums': ['f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc'], + }), + ('anyio', '4.3.0', { + 'checksums': ['f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6'], + }), + ('jupyter_server', version, { + 'checksums': ['659154cea512083434fd7c93b7fe0897af7a2fd0b9dd4749282b42eaac4ae677'], + }), + ('jupyterlab_widgets', '3.0.10', { + 'checksums': ['04f2ac04976727e4f9d0fa91cdc2f1ab860f965e504c29dbd6a65c882c9d04c0'], + }), + ('widgetsnbextension', '4.0.10', { + 'checksums': ['64196c5ff3b9a9183a8e699a4227fb0b7002f252c814098e66c4d1cd0644688f'], + }), + ('comm', '0.2.2', { + 'checksums': ['3fd7a84065306e07bea1773df6eb8282de51ba82f77c72f9c85716ab11fe980e'], + }), + ('ipywidgets', '8.1.2', { + 'checksums': ['d0b9b41e49bae926a866e613a39b0f0097745d2b9f1f3dd406641b4a57ec42c9'], + }), + # The following few extensions are needed for e.g. JupyterLab but also nbclassic. + # Avoid duplication by making it part of this bundle + ('notebook_shim', '0.2.4', { + 'checksums': ['b4b2cfa1b65d98307ca24361f5b30fe785b53c3fd07b7a47e89acb5e6ac638cb'], + }), + ('nest_asyncio', '1.6.0', { + 'checksums': ['6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe'], + }), + ('ipykernel', '6.29.4', { + 'checksums': ['3d44070060f9475ac2092b760123fadf105d2e2493c24848b6691a7c4f42af5c'], + }), + ('ipython_genutils', '0.2.0', { + 'checksums': ['eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8'], + }), + ('debugpy', '1.8.1', { + 'source_tmpl': '%(name)s-%(version)s-py2.py3-none-any.whl', + 'checksums': ['28acbe2241222b87e255260c76741e1fbf04fdc3b6d094fcf57b6c6f75ce1242'], + }), +] + +sanity_check_paths = { + 'files': ['bin/jupyter'], + 'dirs': ['share/jupyter', 'etc/jupyter'], +} + +sanity_check_commands = ['jupyter --help'] + +modextrapaths = {'EB_ENV_JUPYTER_ROOT': ''} + +moduleclass = 'tools' From d6bf6cb34db34ee68eb71b104d143ba4d40f72ae Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Thu, 23 May 2024 12:07:43 +0200 Subject: [PATCH 2/2] adding easyconfigs: hatch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb --- ...ch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/h/hatch-jupyter-builder/hatch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb diff --git a/easybuild/easyconfigs/h/hatch-jupyter-builder/hatch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb b/easybuild/easyconfigs/h/hatch-jupyter-builder/hatch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..a1c10cc3b01 --- /dev/null +++ b/easybuild/easyconfigs/h/hatch-jupyter-builder/hatch-jupyter-builder-0.9.1-GCCcore-13.2.0.eb @@ -0,0 +1,35 @@ +easyblock = 'PythonBundle' + +name = 'hatch-jupyter-builder' +version = "0.9.1" + +homepage = 'https://hatch-jupyter-builder.readthedocs.io' +description = """Hatch Jupyter Builder is a plugin for the hatchling Python build backend. It is +primarily targeted for package authors who are providing JavaScript as part of +their Python packages. +Typical use cases are Jupyter Lab Extensions and Jupyter Widgets.""" + + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +builddependencies = [ + ('binutils', '2.40'), +] +dependencies = [ + ('Python', '3.11.5'), + ('hatchling', '1.18.0'), +] + +sanity_pip_check = True +use_pip = True + +exts_list = [ + ('hatch_nodejs_version', '0.3.2', { + 'checksums': ['8a7828d817b71e50bbbbb01c9bfc0b329657b7900c56846489b9c958de15b54c'], + }), + ('hatch_jupyter_builder', '0.9.1', { + 'checksums': ['79278198d124c646b799c5e8dca8504aed9dcaaa88d071a09eb0b5c2009a58ad'], + }), +] + +moduleclass = 'tools'