commit a4e0c392a737713796269eb9db3ada6f16e6163c1a7015ffc06763dfe3a5f7cb Author: Adrian Schröter Date: Fri May 3 14:08:46 2024 +0200 Sync from SUSE:SLFO:Main jupyter revision d8d75dafac7755979f8c0a98e47f7287 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..5e9cab1 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + jupyter-filesystem + diff --git a/jupyter-1.0.0.tar.gz b/jupyter-1.0.0.tar.gz new file mode 100644 index 0000000..a6952f5 --- /dev/null +++ b/jupyter-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f +size 12916 diff --git a/jupyter-filesystem.changes b/jupyter-filesystem.changes new file mode 100644 index 0000000..c16c084 --- /dev/null +++ b/jupyter-filesystem.changes @@ -0,0 +1,52 @@ +------------------------------------------------------------------- +Tue Dec 27 00:24:42 UTC 2022 - Ben Greiner + +- Update to 20221227 + * Fix %jupyter_move_config + +------------------------------------------------------------------- +Fri Jan 7 21:26:08 UTC 2022 - Ben Greiner + +- Update to 20220107 + * Add jupyter-rpm-macros metapackage + * provide convenience macro %_jupyter_config for distinction + between _distconfdir (15.4 and TW) and _sysconfdir (15.3) + +------------------------------------------------------------------- +Thu Jan 6 12:41:56 UTC 2022 - Ben Greiner + +- jupyter-jupyterlab-widgets is a real package (again). + +------------------------------------------------------------------- +Sun Nov 14 16:27:05 UTC 2021 - Ben Greiner + +- Update to 20211114 + * move/keep distribution provided jupyter config to/in + %_distconfdir + * add macro for jupyterlab3 extensions dir + * make package noarch + +------------------------------------------------------------------- +Sun Jan 31 00:32:57 UTC 2021 - Benjamin Greiner + +- BuildRequire python-rpm-macros because the definition from + the prjconfig introduces rich dependencies, which must be + overridden by the lua version. + gh#openSUSE/python-rpm-macros#99 + +------------------------------------------------------------------- +Fri Aug 23 22:34:46 UTC 2019 - Todd R + +- Have jupyterlab-filesystem provide/obsolete jupyterlab-widgets. + jupyterlab-widgets is no longer available as a python package. + +------------------------------------------------------------------- +Fri May 24 02:52:16 UTC 2019 - Todd R + +- Use %{_rpmmacrodir} + +------------------------------------------------------------------- +Tue May 14 19:01:28 UTC 2019 - Todd R + +- Initial version + diff --git a/jupyter-filesystem.spec b/jupyter-filesystem.spec new file mode 100644 index 0000000..4d7ee43 --- /dev/null +++ b/jupyter-filesystem.spec @@ -0,0 +1,197 @@ +# +# spec file for package jupyter-filesystem +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: jupyter-filesystem +URL: https://jupyter.org/ +Version: 20221227 +Release: 0 +%define tar_ver 1.0.0 +Summary: Common directories shared by Jupyter packages +License: BSD-3-Clause +Group: System/Fhs +Source0: https://files.pythonhosted.org/packages/source/j/jupyter/jupyter-%{tar_ver}.tar.gz +Source10: macros.jupyter_core +Source11: macros.jupyter_notebook +Source12: macros.jupyterlab +BuildRequires: python-rpm-macros +BuildArch: noarch + +%description +This package provides common directories and macros used by many +jupyter packages. + +%package -n jupyter-jupyter_core-filesystem +Summary: Common directories shared by Jupyter packages +Group: System/Fhs +Provides: %{python_module jupyter_core-filesystem = %{version}} +Provides: %{python_module jupyter_core-macros-devel = %{version}} +Provides: jupyter-jupyter_core-macros-devel = %{version} + +%description -n jupyter-jupyter_core-filesystem +This package provides common directories and macros used by many +packages that depend on jupyter_core. + +It also provides macros for building packages that depend on +jupyter_core. + +%define _jupyter_prefix %{_datadir}/jupyter/ +%define _jupyter_kernel_dir %{_jupyter_prefix}/kernels/ +%define _jupyter_confdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/jupyter/ +%define _jupyter_distconfig %{?_distconfdir:1}%{nil} +%define _jupyter_config %{!?_distconfdir:%config}%{nil} + +%package -n jupyter-notebook-filesystem +Summary: Common directories shared by Jupyter notebook packages +Group: System/Fhs +Requires: jupyter-jupyter_core-filesystem = %{version} +Requires: python-rpm-macros +Provides: %{python_module notebook-filesystem = %{version}} +Provides: %{python_module notebook-macros-devel = %{version}} +Provides: jupyter-notebook-macros-devel = %{version} + +%description -n jupyter-notebook-filesystem +This package provides common directories and macros used by many +packages that depend on the Jupyter notebook. + +It also provides macros for building packages that depend on +the Jupyter notebook. + +%define _jupyter_nbextension_dir %{_jupyter_prefix}/nbextensions/ +%define _jupyter_nb_confdir %{_jupyter_confdir}/nbconfig/ +%define _jupyter_nbextension_confdir %{_jupyter_nb_confdir}/nbextensions/ +%define _jupyter_servextension_confdir %{_jupyter_confdir}/jupyter_notebook_config.d/ +%define _jupyter_server_confdir %{_jupyter_confdir}/jupyter_server_config.d/ + +%define _jupyter_nb_auth_confdir %{_jupyter_nb_confdir}/auth.d +%define _jupyter_nb_base_confdir %{_jupyter_nb_confdir}/base.d +%define _jupyter_nb_bidi_confdir %{_jupyter_nb_confdir}/bidi.d +%define _jupyter_nb_custom_confdir %{_jupyter_nb_confdir}/custom.d +%define _jupyter_nb_edit_confdir %{_jupyter_nb_confdir}/edit.d +%define _jupyter_nb_notebook_confdir %{_jupyter_nb_confdir}/notebook.d +%define _jupyter_nb_services_confdir %{_jupyter_nb_confdir}/services.d +%define _jupyter_nb_style_confdir %{_jupyter_nb_confdir}/style.d +%define _jupyter_nb_terminal_confdir %{_jupyter_nb_confdir}/terminal.d +%define _jupyter_nb_tree_confdir %{_jupyter_nb_confdir}/tree.d + +%package -n jupyter-jupyterlab-filesystem +Summary: Common directories shared by JupyterLab packages +Group: System/Fhs +Requires: jupyter-jupyter_core-filesystem = %{version} +Provides: %{python_module jupyterlab-filesystem = %{version}} +Provides: %{python_module jupyterlab-macros-devel = %{version}} +Provides: jupyter-jupyterlab-macros-devel = %{version} + +%description -n jupyter-jupyterlab-filesystem +This package provides common directories and macros used by many +packages that depend on JupyterLab. + +It also provides macros for building packages that depend on +JupyterLab. + +%define _jupyter_lab_dir %{_jupyter_prefix}/lab/ +%define _jupyter_labextensions_dir %{_jupyter_lab_dir}/extensions/ +%define _jupyter_labextensions_dir3 %{_jupyter_prefix}/labextensions/ + +%package -n jupyter-rpm-macros +Summary: Macros for building Jupyter RPM packages +Requires: jupyter-jupyter_core-filesystem = %{version} +Requires: jupyter-jupyterlab-filesystem = %{version} +Requires: jupyter-notebook-filesystem = %{version} + +%description -n jupyter-rpm-macros +This package provides macros for building packages that interface with +Jupyter, Notebook or Jupyterlab. + +%prep +%setup -q -n jupyter-%{tar_ver} + +%build +# Not needed + +%install +# macros +install -D -m644 %{SOURCE10} %{buildroot}%{_rpmmacrodir}/macros.jupyter_core +install -D -m644 %{SOURCE11} %{buildroot}%{_rpmmacrodir}/macros.jupyter_notebook +install -D -m644 %{SOURCE12} %{buildroot}%{_rpmmacrodir}/macros.jupyterlab + +# jupyter_core directories +mkdir -p %{buildroot}%{_jupyter_prefix} +mkdir -p %{buildroot}%{_jupyter_kernel_dir} +mkdir -p %{buildroot}%{_jupyter_confdir} + +# notebook directories +mkdir -p %{buildroot}%{_jupyter_nbextension_dir} +mkdir -p %{buildroot}%{_jupyter_nb_confdir} +mkdir -p %{buildroot}%{_jupyter_nbextension_confdir} +mkdir -p %{buildroot}%{_jupyter_servextension_confdir} +mkdir -p %{buildroot}%{_jupyter_server_confdir} + +mkdir -p %{buildroot}%{_jupyter_nb_auth_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_base_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_bidi_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_custom_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_edit_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_notebook_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_services_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_style_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_terminal_confdir} +mkdir -p %{buildroot}%{_jupyter_nb_tree_confdir} + +# jupyterlab directories +mkdir -p %{buildroot}%{_jupyter_lab_dir} +mkdir -p %{buildroot}%{_jupyter_labextensions_dir} +mkdir -p %{buildroot}%{_jupyter_labextensions_dir3} + +%files -n jupyter-jupyter_core-filesystem +%license LICENSE +%{_rpmmacrodir}/macros.jupyter_core +%dir %{_jupyter_prefix} +%dir %{_jupyter_kernel_dir} +%dir %{_jupyter_confdir} + +%files -n jupyter-notebook-filesystem +%license LICENSE +%{_rpmmacrodir}/macros.jupyter_notebook +%dir %{_jupyter_nbextension_dir} +%dir %{_jupyter_nb_confdir} +%dir %{_jupyter_nbextension_confdir} +%dir %{_jupyter_servextension_confdir} +%dir %{_jupyter_server_confdir} +%dir %{_jupyter_nb_auth_confdir} +%dir %{_jupyter_nb_base_confdir} +%dir %{_jupyter_nb_bidi_confdir} +%dir %{_jupyter_nb_custom_confdir} +%dir %{_jupyter_nb_edit_confdir} +%dir %{_jupyter_nb_notebook_confdir} +%dir %{_jupyter_nb_services_confdir} +%dir %{_jupyter_nb_style_confdir} +%dir %{_jupyter_nb_terminal_confdir} +%dir %{_jupyter_nb_tree_confdir} + +%files -n jupyter-jupyterlab-filesystem +%license LICENSE +%{_rpmmacrodir}/macros.jupyterlab +%dir %{_jupyter_lab_dir} +%dir %{_jupyter_labextensions_dir} +%dir %{_jupyter_labextensions_dir3} + +%files -n jupyter-rpm-macros +%license LICENSE + +%changelog diff --git a/jupyter.changes b/jupyter.changes new file mode 100644 index 0000000..03175bf --- /dev/null +++ b/jupyter.changes @@ -0,0 +1,99 @@ +------------------------------------------------------------------- +Mon May 22 12:25:44 UTC 2023 - Jiri Srain + +- refresh also the jupyter.zip from upstream URL + +------------------------------------------------------------------- +Mon May 22 08:13:57 UTC 2023 - Jiri Srain + +- refresh the jupyter.pdf from upstream URL + +------------------------------------------------------------------- +Fri May 5 15:15:59 UTC 2023 - Dominique Leuenberger + +- Add _multibuild to define 2nd spec file as additional flavor. + Eliminates the need for source package links in OBS. + +------------------------------------------------------------------- +Thu Mar 30 19:03:33 UTC 2023 - Ben Greiner + +- remove explicit jupyter-client dep in order ot avoid resolver + conflicts with python-notebook + +------------------------------------------------------------------- +Fri Jan 7 21:33:12 UTC 2022 - Ben Greiner + +- Skip python2: There is no python2-qtconsole + +------------------------------------------------------------------- +Sun Nov 14 18:14:37 UTC 2021 - Ben Greiner + +- Require python(abi) in order to silence rpmlint + +------------------------------------------------------------------- +Sun Jan 31 00:02:26 UTC 2021 - Ben Greiner + +- Back to singlespec for multiple python flavors. The primary + python3 flavor provides the "jupyter" package. +- Do what the description advertises and what upstream does: + Require the specified packages +- Update documentation files: jupyter.pdf and jupyter.zip + +------------------------------------------------------------------- +Tue Nov 12 17:40:51 UTC 2019 - Todd R + +- jupyter_core has been renamed to jupyter-core +- jupyter_client has been renamed to jupyter-client + +------------------------------------------------------------------- +Thu Apr 25 01:59:57 UTC 2019 - Todd R + +- Rename to to match jupyter package naming guidelines. + +------------------------------------------------------------------- +Tue Feb 13 19:47:23 UTC 2018 - toddrme2178@gmail.com + +- Update url + +------------------------------------------------------------------- +Wed Apr 26 21:18:33 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. + +------------------------------------------------------------------- +Fri Apr 7 18:26:26 UTC 2017 - toddrme2178@gmail.com + +- Remove jupyter.py since it is now provided by python3-jupyter_core. +- Clean up documentation building. + +------------------------------------------------------------------- +Thu Mar 16 14:31:41 UTC 2017 - jmatejek@suse.com + +- do not Recommend jupyter_nbconvert (which pulls in texlive) + +------------------------------------------------------------------- +Wed Oct 21 10:06:44 UTC 2015 - toddrme2178@gmail.com + +- No longer provide or obsolete IPython. + This is provided and obsoleted by python-jupyter_ipython. + +------------------------------------------------------------------- +Mon Oct 5 16:41:50 UTC 2015 - toddrme2178@gmail.com + +- Build documentation + +------------------------------------------------------------------- +Fri Aug 28 18:36:39 UTC 2015 - toddrme2178@gmail.com + +- Fix provides again. + +------------------------------------------------------------------- +Fri Aug 28 08:19:18 UTC 2015 - toddrme2178@gmail.com + +- Fix provides and obsoletes + +------------------------------------------------------------------- +Fri Aug 28 07:37:42 UTC 2015 - toddrme2178@gmail.com + +- Initial version + diff --git a/jupyter.pdf b/jupyter.pdf new file mode 100644 index 0000000..2fca7e8 --- /dev/null +++ b/jupyter.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6258f1447cfb2596f91cbf92f549f14a0ba97b4cbdfd88d36ce62e5005bfbd1 +size 3076679 diff --git a/jupyter.spec b/jupyter.spec new file mode 100644 index 0000000..b4a7089 --- /dev/null +++ b/jupyter.spec @@ -0,0 +1,123 @@ +# +# spec file for package jupyter +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define plainpython python +%define skip_python2 1 +Name: jupyter +Version: 1.0.0 +Release: 0 +Summary: Metapackage to install all the Jupyter components in one go +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/jupyter/jupyter +Source0: https://files.pythonhosted.org/packages/source/j/jupyter/jupyter-%{version}.tar.gz +Source1: https://buildmedia.readthedocs.org/media/pdf/jupyter/latest/jupyter.pdf +Source2: https://buildmedia.readthedocs.org/media/htmlzip/jupyter/latest/jupyter.zip +BuildRequires: %{python_module ipykernel} +BuildRequires: %{python_module ipywidgets} +#BuildRequires: %%{python_module jupyter-client} +BuildRequires: %{python_module jupyter-core} +BuildRequires: %{python_module jupyter_console} +BuildRequires: %{python_module nbconvert} +BuildRequires: %{python_module notebook} +BuildRequires: %{python_module qtconsole} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: unzip +Requires: python-ipykernel +Requires: python-ipywidgets +# current notebook 6.5 requires jupyter-client < 8 +#Requires: python-jupyter-client +Requires: python-jupyter-core +Requires: python-jupyter_console +Requires: python-nbconvert +Requires: python-notebook +Requires: python-qtconsole +Requires: %plainpython(abi) = %{python_version} +%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" +Provides: jupyter = %{version}-%{release} +Obsoletes: jupyter < %{version}-%{release} +%endif +BuildArch: noarch +%python_subpackages + +%description +Jupyter is an environment for interactive computing in multiple languages. +It includes a console, a browser-based notebook format, and support for +dozens of languages through the use of language-specific kernels. + +Jupyter is an evolution and modularization of the IPython project, separating +out the python3-specific parts from the language-agnostic parts. + +This package pulls in the main Jupyter system, including the notebook, +qtconsole, and the IPython kernel. Additional components and kernels +can be installed separately. + +%package -n jupyter-doc +Summary: HTML documentation for %{name} +Group: Development/Languages/Python +Provides: %{name}-doc-html = %{version}-%{release} +Provides: %{name}-doc-pdf = %{version}-%{release} +Provides: %{python_module %{name}-doc = %{version}-%{release}} +Provides: %{python_module %{name}-doc-html = %{version}-%{release}} +Provides: %{python_module %{name}-doc-pdf = %{version}-%{release}} +Obsoletes: %{name}-doc-html < %{version}-%{release} +Obsoletes: %{name}-doc-pdf < %{version}-%{release} +Obsoletes: %{python_module %{name}-doc-html < %{version}-%{release}} +Obsoletes: %{python_module %{name}-doc-pdf < %{version}-%{release}} + +%description -n jupyter-doc +Documentation and help files for %{name}. + +%prep +%setup -q -n jupyter-%{version} +unzip %{SOURCE2} -d docs +mv docs/jupyter-* docs/html +rm docs/html/.buildinfo + +%build +%python_build + +%install +%python_install + +# Install documentation +mkdir -p %{buildroot}%{_docdir}/%{name} + +cp %{SOURCE1} %{buildroot}%{_docdir}/%{name}/ +cp -r docs/html %{buildroot}%{_docdir}/%{name}/ + +%fdupes %{buildroot}%{_docdir}/%{name}/ + +%files %python_files +%license LICENSE +%doc README.md +%{python_sitelib}/jupyter-%{version}*-info +# This is provided by jupyter_core now +%exclude %{python_sitelib}/jupyter.py* +%pycache_only %exclude %{python_sitelib}/__pycache__/ + +%files -n jupyter-doc +%license LICENSE +%doc README.md +%dir %{_docdir}/%{name}/ +%{_docdir}/%{name}/html/ +%{_docdir}/%{name}/jupyter.pdf + +%changelog diff --git a/jupyter.zip b/jupyter.zip new file mode 100644 index 0000000..b44204d --- /dev/null +++ b/jupyter.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c885396738317bafbb340f24c90c7d0b3eea01339863de351c0b4cf3215c598 +size 5821363 diff --git a/macros.jupyter_core b/macros.jupyter_core new file mode 100644 index 0000000..c41c038 --- /dev/null +++ b/macros.jupyter_core @@ -0,0 +1,13 @@ +%_jupyter_prefix %{_datadir}/jupyter/ +%_jupyter_kernel_dir %{_jupyter_prefix}/kernels/ +%_jupyter_confdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/jupyter/ +%_jupyter_distconfig %{?_distconfdir:1}%{nil} +%_jupyter_config %{!?_distconfdir:%config}%{nil} + +%jupyter_move_config \ + if [ "$(dirname %{_prefix}/etc/jupyter/)" != "$(dirname %{_jupyter_confdir})" ]; then \ + mkdir -p %{buildroot}%{_jupyter_confdir} \ + mv %{buildroot}%{_prefix}/etc/jupyter/* %{buildroot}%{_jupyter_confdir} \ + rm -d %{buildroot}%{_prefix}/etc/jupyter %{buildroot}%{_prefix}/etc \ + fi \ +%{nil} diff --git a/macros.jupyter_notebook b/macros.jupyter_notebook new file mode 100644 index 0000000..c4ec113 --- /dev/null +++ b/macros.jupyter_notebook @@ -0,0 +1,40 @@ +%_jupyter_nbextension_dir %{_jupyter_prefix}/nbextensions/ +%_jupyter_nb_confdir %{_jupyter_confdir}/nbconfig/ +%_jupyter_nbextension_confdir %{_jupyter_nb_confdir}/nbextensions/ +%_jupyter_servextension_confdir %{_jupyter_confdir}/jupyter_notebook_config.d/ +%_jupyter_server_confdir %{_jupyter_confdir}/jupyter_server_config.d/ + +%_jupyter_nb_auth_confdir %{_jupyter_nb_confdir}/auth.d +%_jupyter_nb_base_confdir %{_jupyter_nb_confdir}/base.d +%_jupyter_nb_bidi_confdir %{_jupyter_nb_confdir}/bidi.d +%_jupyter_nb_custom_confdir %{_jupyter_nb_confdir}/custom.d +%_jupyter_nb_edit_confdir %{_jupyter_nb_confdir}/edit.d +%_jupyter_nb_notebook_confdir %{_jupyter_nb_confdir}/notebook.d +%_jupyter_nb_services_confdir %{_jupyter_nb_confdir}/services.d +%_jupyter_nb_style_confdir %{_jupyter_nb_confdir}/style.d +%_jupyter_nb_terminal_confdir %{_jupyter_nb_confdir}/terminal.d +%_jupyter_nb_tree_confdir %{_jupyter_nb_confdir}/tree.d + +%jupyter_nbextension_install() \ + PYTHONPATH=%{buildroot}%{python3_sitelib} jupyter nbextension install --nbextensions=%{buildroot}%{_jupyter_nbextension_dir} --py %{1} \ +%{nil} + +%jupyter_nbextension_enable() \ + jupyter nbextension enable --py --system %{1} || true \ +%{nil} + +%jupyter_serverextension_enable() \ + jupyter serverextension enable --py --system %{1} || true \ +%{nil} + +%jupyter_nbextension_disable() \ + if [ $1 = 0 ] && [ -d %{python3_sitelib}/%{1}/ ] ; then \ + jupyter nbextension disable --py --system %{1} || true \ + fi \ +%{nil} + +%jupyter_serverextension_disable() \ + if [ $1 = 0 ] && [ -d %{python3_sitelib}/%{1}/ ] ; then \ + jupyter serverextension disable --py --system %{1} || true \ + fi \ +%{nil} diff --git a/macros.jupyterlab b/macros.jupyterlab new file mode 100644 index 0000000..e7cecfc --- /dev/null +++ b/macros.jupyterlab @@ -0,0 +1,3 @@ +%_jupyter_lab_dir %{_jupyter_prefix}/lab/ +%_jupyter_labextensions_dir %{_jupyter_lab_dir}/extensions/ +%_jupyter_labextensions_dir3 %{_jupyter_prefix}/labextensions/