Accepting request 705228 from devel:languages:python:jupyter
- Add a jupyter-specific language package - Split directories and macros into separate package. - Make lang subpackage python version-specific OBS-URL: https://build.opensuse.org/request/show/705228 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-notebook?expand=0&rev=2
This commit is contained in:
commit
f6c1748503
@ -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}
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 24 03:33:21 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Add a jupyter-specific language package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 22 18:59:10 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Split directories and macros into separate package.
|
||||
- Make lang subpackage python version-specific
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 15 15:56:00 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
|
@ -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,21 @@ 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}
|
||||
Requires: jupyter-notebook-lang = %{version}
|
||||
|
||||
%description lang
|
||||
Provides translations for the Jupyter notebook.
|
||||
|
||||
This package provides the python module translations.
|
||||
|
||||
%package -n jupyter-notebook
|
||||
Summary: Jupyter Notebook interface
|
||||
Requires: jupyter-ipykernel
|
||||
@ -94,8 +109,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
|
||||
|
||||
@ -106,18 +120,16 @@ interactive computing.
|
||||
This package provides the jupyter components.
|
||||
|
||||
%package -n jupyter-notebook-lang
|
||||
# FIXME: consider using %%lang_package macro
|
||||
Summary: Provides translations for %{name}
|
||||
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}
|
||||
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.
|
||||
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
|
||||
@ -146,7 +158,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 +170,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 +184,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 +197,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 +209,9 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user