From 6cd0b7f95461e09f7ec58e561d3031f03d6b6886743cab84ba577cf4d5ccd65f Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 22 May 2019 20:11:08 +0000 Subject: [PATCH 1/3] Accepting request 704840 from home:TheBlackCat:branches:devel:languages:python:jupyter - Split directories and macros into separate package. - Make lang subpackage python version-specific OBS-URL: https://build.opensuse.org/request/show/704840 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=12 --- python-notebook.changes | 6 ++++ python-notebook.spec | 76 ++++++++++++++--------------------------- 2 files changed, 31 insertions(+), 51 deletions(-) diff --git a/python-notebook.changes b/python-notebook.changes index 3a0a4b2..7ae3a7f 100644 --- a/python-notebook.changes +++ b/python-notebook.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 22 18:59:10 UTC 2019 - Todd R + +- Split directories and macros into separate package. +- Make lang subpackage python version-specific + ------------------------------------------------------------------- Wed May 15 15:56:00 UTC 2019 - Todd R diff --git a/python-notebook.spec b/python-notebook.spec index 2b17e24..5e2da84 100644 --- a/python-notebook.spec +++ b/python-notebook.spec @@ -28,12 +28,12 @@ URL: https://github.com/jupyter/notebook Source0: https://files.pythonhosted.org/packages/source/n/notebook/notebook-%{version}.tar.gz Source1: https://media.readthedocs.org/pdf/jupyter-notebook/%{doc_ver}/jupyter-notebook.pdf Source2: https://media.readthedocs.org/htmlzip/jupyter-notebook/%{doc_ver}/jupyter-notebook.zip -Source10: macros.jupyter_notebook Source100: python-notebook-rpmlintrc BuildRequires: %{python_module jupyter_core >= 4.4.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: hicolor-icon-theme +BuildRequires: jupyter-notebook-filesystem BuildRequires: python-rpm-macros BuildRequires: unzip Requires: jupyter-notebook = %{version} @@ -87,6 +87,24 @@ interactive computing. This package provides the python interface. +%package lang +# FIXME: consider using %%lang_package macro +Summary: Provides translations for the Jupyter Notebook +Group: System/Localization +Requires: python-notebook = %{version} +Provides: python-notebook-lang-all = %{version} +Provides: python-jupyter_notebook-lang = %{version} +Obsoletes: python-jupyter_notebook-lang < %{version} +%ifpython3 +Provides: jupyter-notebook-lang = %{version} +Provides: jupyter-notebook-lang-all = %{version} +Obsoletes: jupyter-notebook-lang <= %{version} +Obsoletes: jupyter-notebook-lang-all <= %{version} +%endif + +%description lang +Provides translations for the "jupyter-notebook" package. + %package -n jupyter-notebook Summary: Jupyter Notebook interface Requires: jupyter-ipykernel @@ -94,8 +112,7 @@ Requires: jupyter-jupyter_client >= 5.2.0 Requires: jupyter-jupyter_core >= 4.4.0 Requires: jupyter-nbconvert Requires: jupyter-nbformat -# This package provides macros that depend on these macros -Requires: python-rpm-macros +Requires: jupyter-notebook-filesystem Requires: python3-notebook = %{version} Conflicts: python3-jupyter_notebook < 5.7.8 @@ -105,20 +122,6 @@ interactive computing. This package provides the jupyter components. -%package -n jupyter-notebook-lang -# FIXME: consider using %%lang_package macro -Summary: Provides translations for %{name} -Group: System/Localization -Requires: jupyter-notebook = %{version} -Provides: jupyter-notebook-lang-all = %{version} -Provides: %{python_module notebook-lang = %{version}} -Provides: %{python_module notebook-lang-all = %{version}} -Provides: %{python_module jupyter_notebook-lang = %{version}} -Obsoletes: %{python_module jupyter_notebook-lang < %{version}} - -%description -n jupyter-notebook-lang -Provides translations for the "jupyter-notebook" package. - %package -n jupyter-notebook-latex Summary: LaTeX support for the Jupyter Notebook Group: Development/Languages/Python @@ -146,7 +149,6 @@ Documentation and help files for Jupyter's notebook. %prep %setup -q -n notebook-%{version} -cp %{SOURCE1} . unzip %{SOURCE2} -d docs mv docs/jupyter-notebook-* docs/html rm docs/html/.buildinfo @@ -159,16 +161,6 @@ rm docs/html/.buildinfo %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -# These directories are used for extensions -mkdir -p %{buildroot}%{_jupyter_prefix}/nbextensions -mkdir -p %{buildroot}%{_jupyter_confdir}/jupyter_notebook_config.d/ -mkdir -p %{buildroot}%{_jupyter_confdir}/jupyter_server_config.d/ -mkdir -p %{buildroot}%{_jupyter_confdir}/nbextensions/ - -for d in auth base bidi custom edit notebook services style terminal tree ; do - mkdir -p %{buildroot}%{_jupyter_confdir}/nbconfig/${d}.d -done - # Install icons mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ cp docs/resources/icon_512x512.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/JupyterNotebook.svg @@ -183,8 +175,6 @@ mkdir -p %{buildroot}%{_docdir}/jupyter-notebook/ cp -r %{SOURCE1} %{buildroot}%{_docdir}/jupyter-notebook/ cp -r docs/html %{buildroot}%{_docdir}/jupyter-notebook/ -install -D -m644 %{SOURCE10} %{buildroot}%{_rpmconfigdir}/macros.d/macros.jupyter_notebook - %fdupes %{buildroot}%{_docdir}/jupyter-notebook/html/ %check @@ -198,6 +188,11 @@ export LANG=en_US.UTF-8 %{python_sitelib}/notebook/ %exclude %{python_sitelib}/notebook/i18n/*/ +%files %{python_files lang} +%license COPYING.md +%lang(fr_FR) %{python_sitelib}/notebook/i18n/fr_FR/ +%lang(zh_CN) %{python_sitelib}/notebook/i18n/zh_CN/ + %files -n jupyter-notebook %license COPYING.md %{_bindir}/jupyter-bundlerextension @@ -205,27 +200,6 @@ export LANG=en_US.UTF-8 %{_bindir}/jupyter-notebook %{_bindir}/jupyter-serverextension %{_datadir}/icons/hicolor/*/apps/JupyterNotebook.* -%{_rpmconfigdir}/macros.d/macros.jupyter_notebook -%dir %{_jupyter_prefix}/nbextensions -%dir %{_jupyter_confdir}/jupyter_notebook_config.d/ -%dir %{_jupyter_confdir}/jupyter_server_config.d/ -%dir %{_jupyter_confdir}/nbextensions/ -%dir %{_jupyter_confdir}/nbconfig/ -%dir %{_jupyter_confdir}/nbconfig/auth.d -%dir %{_jupyter_confdir}/nbconfig/base.d -%dir %{_jupyter_confdir}/nbconfig/bidi.d -%dir %{_jupyter_confdir}/nbconfig/custom.d -%dir %{_jupyter_confdir}/nbconfig/edit.d -%dir %{_jupyter_confdir}/nbconfig/notebook.d -%dir %{_jupyter_confdir}/nbconfig/services.d -%dir %{_jupyter_confdir}/nbconfig/style.d -%dir %{_jupyter_confdir}/nbconfig/terminal.d -%dir %{_jupyter_confdir}/nbconfig/tree.d - -%files -n jupyter-notebook-lang -%license COPYING.md -%lang(fr_FR) %{python_sitelib}/notebook/i18n/fr_FR/ -%lang(zh_CN) %{python_sitelib}/notebook/i18n/zh_CN/ %files -n jupyter-notebook-latex %license COPYING.md From 43f58c222e31b95261e8f7d97426e48c7b66f0c38c035fb7ce875425eb0f546f Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 22 May 2019 20:29:42 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=13 --- macros.jupyter_notebook | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 macros.jupyter_notebook diff --git a/macros.jupyter_notebook b/macros.jupyter_notebook deleted file mode 100644 index c4ec113..0000000 --- a/macros.jupyter_notebook +++ /dev/null @@ -1,40 +0,0 @@ -%_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} From 60c304950fd1a9e098605fb8aba6199a684b4ae2ec67deedfe34336a125e6b19 Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 24 May 2019 12:03:33 +0000 Subject: [PATCH 3/3] Accepting request 705226 from home:TheBlackCat:branches:devel:languages:python:jupyter - Add a jupyter-specific language package OBS-URL: https://build.opensuse.org/request/show/705226 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-notebook?expand=0&rev=14 --- python-notebook.changes | 5 +++++ python-notebook.spec | 26 +++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/python-notebook.changes b/python-notebook.changes index 7ae3a7f..a2e9c95 100644 --- a/python-notebook.changes +++ b/python-notebook.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 24 03:33:21 UTC 2019 - Todd R + +- Add a jupyter-specific language package + ------------------------------------------------------------------- Wed May 22 18:59:10 UTC 2019 - Todd R diff --git a/python-notebook.spec b/python-notebook.spec index 5e2da84..ed0b87f 100644 --- a/python-notebook.spec +++ b/python-notebook.spec @@ -95,15 +95,12 @@ Requires: python-notebook = %{version} Provides: python-notebook-lang-all = %{version} Provides: python-jupyter_notebook-lang = %{version} Obsoletes: python-jupyter_notebook-lang < %{version} -%ifpython3 -Provides: jupyter-notebook-lang = %{version} -Provides: jupyter-notebook-lang-all = %{version} -Obsoletes: jupyter-notebook-lang <= %{version} -Obsoletes: jupyter-notebook-lang-all <= %{version} -%endif +Requires: jupyter-notebook-lang = %{version} %description lang -Provides translations for the "jupyter-notebook" package. +Provides translations for the Jupyter notebook. + +This package provides the python module translations. %package -n jupyter-notebook Summary: Jupyter Notebook interface @@ -122,6 +119,18 @@ interactive computing. This package provides the jupyter components. +%package -n jupyter-notebook-lang +Summary: Provides translations for the Jupyter Notebook +Group: System/Localization +Requires: jupyter-notebook = %{version} +Requires: python3-notebook-lang = %{version} +Provides: jupyter-notebook-lang-all = %{version} + +%description -n jupyter-notebook-lang +Provides translations for the Jupyter notebook. + +This package provides the jupyter component translations. + %package -n jupyter-notebook-latex Summary: LaTeX support for the Jupyter Notebook Group: Development/Languages/Python @@ -201,6 +210,9 @@ export LANG=en_US.UTF-8 %{_bindir}/jupyter-serverextension %{_datadir}/icons/hicolor/*/apps/JupyterNotebook.* +%files -n jupyter-notebook-lang +%license COPYING.md + %files -n jupyter-notebook-latex %license COPYING.md