From 20308efd6c376e0da65d0780a97003155cfaeeb398f7104637943d0bee37b704 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sat, 1 Oct 2022 19:17:45 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclassic?expand=0&rev=17 --- python-nbclassic.spec | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/python-nbclassic.spec b/python-nbclassic.spec index 0975aad..f5ef94d 100644 --- a/python-nbclassic.spec +++ b/python-nbclassic.spec @@ -24,9 +24,10 @@ %define psuffix %{nil} %bcond_with test %endif -%define plainpython python + # this conditional is used in the python-rpm-macros, but `osc build --without libalternatives` won't work %bcond_without libalternatives + Name: python-nbclassic%{psuffix} Version: 0.4.4 Release: 0 @@ -107,7 +108,10 @@ This package contains the jupyterlab server configuration and desktop files %if !%{with test} %install %pyproject_install %{SOURCE1} - +%python_clone -a %{buildroot}%{_bindir}/jupyter-nbclassic +%python_clone -a %{buildroot}%{_bindir}/jupyter-nbclassic-bundlerextension +%python_clone -a %{buildroot}%{_bindir}/jupyter-nbclassic-extension +%python_clone -a %{buildroot}%{_bindir}/jupyter-nbclassic-serverextension %{python_expand # rm %{buildroot}%{$python_sitelib}/nbclassic/bundler/tests/resources/subdir/subsubdir/.gitkeep @@ -129,32 +133,6 @@ sed -E ' ' >> %{$python_prefix}-nbclassic.files < lang-dirs } -# https://github.com/jupyter/notebook/issues/6501 -cp %{buildroot}%{_bindir}/jupyter-nbclassic %{buildroot}%{_bindir}/jupyter-notebook -# clone after copy to jupyter-notebook -%python_clone -a %{buildroot}%{_bindir}/jupyter-nbclassic -duplicates="jupyter-notebook jupyter-nbclassic-bundlerextension jupyter-nbclassic-extension jupyter-nbclassic-serverextension" -for basebin in $duplicates; do - %python_clone -a %{buildroot}%{_bindir}/${basebin} - %{python_expand mv %{buildroot}%{_bindir}/${basebin}{,.nbclassic}-%{$python_bin_suffix} - echo %{_bindir}/${basebin} >> %{$python_prefix}-nbclassic.files - echo %{_bindir}/${basebin}.nbclassic-%{$python_bin_suffix} >> %{$python_prefix}-nbclassic.files - echo "%%dir %{_datadir}/libalternatives/${basebin}" >> %{$python_prefix}-nbclassic.files - # increase priority over alternatives from notebook and use same grouping - myaltprio=%{$python_version_nodots} - if [ "%{$python_provides}" == "python3" ]; then - myaltprio=$(($myaltprio + 1000)) - fi - conf=%{buildroot}%{_datadir}/libalternatives/${basebin}/${myaltprio}.conf - newconf=${conf/.conf/0.conf} - sed "s/${basebin}/${basebin}.nbclassic/" $conf > $newconf - echo "group=${duplicates// /, }" >> $newconf - rm $conf - echo $newconf | sed 's:%{buildroot}::' >> %{$python_prefix}-nbclassic.files - } -done -%fdupes %{buildroot}%{_bindir} - %suse_update_desktop_file jupyter-nbclassic %endif @@ -172,6 +150,9 @@ done %doc README.md %license LICENSE %python_alternative %{_bindir}/jupyter-nbclassic +%python_alternative %{_bindir}/jupyter-nbclassic-bundlerextension +%python_alternative %{_bindir}/jupyter-nbclassic-extension +%python_alternative %{_bindir}/jupyter-nbclassic-serverextension %{python_sitelib}/nbclassic-%{version}*-info %files -n jupyter-nbclassic From 4d89667c5c5d631a0c7287f1993b34715c4cff250107e27a69c7fb813f9672cb Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sat, 1 Oct 2022 19:18:41 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclassic?expand=0&rev=18 --- python-nbclassic.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-nbclassic.changes b/python-nbclassic.changes index 6fd6207..7df0585 100644 --- a/python-nbclassic.changes +++ b/python-nbclassic.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 1 19:17:58 UTC 2022 - Ben Greiner + +- Remove duplicates workaround + ------------------------------------------------------------------- Fri Sep 30 15:15:04 UTC 2022 - Arun Persaud From e3de773a612d9add0a633ad05e282e7e4eeaf315fea62123e5969fa20954dee9 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sat, 1 Oct 2022 19:22:26 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbclassic?expand=0&rev=19 --- python-nbclassic.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python-nbclassic.spec b/python-nbclassic.spec index f5ef94d..a2a1e15 100644 --- a/python-nbclassic.spec +++ b/python-nbclassic.spec @@ -88,6 +88,7 @@ on top of the new Python server backend. %package -n jupyter-nbclassic Summary: Jupyter Notebook as a Jupyter Server Extension +Requires: python3-nbclassic = %{version} %description -n jupyter-nbclassic NBClassic runs the Jupyter Notebook frontend on the Jupyter Server backend.