From 5819995f60b9db2ca4564d8e9e8dd6a5a63a2a78e8be50ead6d2efbeaf53dcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 28 Mar 2020 07:39:28 +0000 Subject: [PATCH 1/4] - Fix buidl without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=7 --- python-jupyter-core.changes | 5 +++++ python-jupyter-core.spec | 3 +++ 2 files changed, 8 insertions(+) diff --git a/python-jupyter-core.changes b/python-jupyter-core.changes index 27024d6..30e5cbe 100644 --- a/python-jupyter-core.changes +++ b/python-jupyter-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 28 07:39:17 UTC 2020 - Tomáš Chvátal + +- Fix buidl without python2 + ------------------------------------------------------------------- Tue Mar 17 07:20:32 UTC 2020 - Tomáš Chvátal diff --git a/python-jupyter-core.spec b/python-jupyter-core.spec index 0758c10..c41223a 100644 --- a/python-jupyter-core.spec +++ b/python-jupyter-core.spec @@ -24,6 +24,7 @@ %define psuffix %{nil} %bcond_with test %endif +%bcond_without python2 %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-jupyter-core%{psuffix} @@ -56,8 +57,10 @@ Obsoletes: %{oldpython}-jupyter_core < %{version} BuildRequires: %{python_module jupyter-core} BuildRequires: %{python_module nose} BuildRequires: %{python_module pytest} +%if %{with python2} BuildRequires: python-mock %endif +%endif %python_subpackages %description From be453b82109718dd6e15f3bbb9148c1bf7fe654eb12d1aae7bb4be1055e03c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 28 Mar 2020 09:15:14 +0000 Subject: [PATCH 2/4] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=8 --- python-jupyter-core.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-jupyter-core.changes b/python-jupyter-core.changes index 30e5cbe..3b21879 100644 --- a/python-jupyter-core.changes +++ b/python-jupyter-core.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Sat Mar 28 07:39:17 UTC 2020 - Tomáš Chvátal -- Fix buidl without python2 +- Fix build without python2 ------------------------------------------------------------------- Tue Mar 17 07:20:32 UTC 2020 - Tomáš Chvátal From 9ef6e37c26679ba821ed18c8a1af099d201264c134de4f2b1a1bd3b3922cad96 Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 5 Apr 2020 19:00:36 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=9 --- python-jupyter-core.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/python-jupyter-core.spec b/python-jupyter-core.spec index c41223a..61ae1ff 100644 --- a/python-jupyter-core.spec +++ b/python-jupyter-core.spec @@ -97,11 +97,6 @@ This package provides the jupyter components. %prep %setup -q -n jupyter_core-%{version} %patch0 -p1 -# Set the appropriate paths dynamically -sed -i "s|\"%{_datadir}/jupyter\"|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py -sed -i "s|\"%{_sysconfdir}/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py -sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" jupyter_core/paths.py -sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" jupyter_core/paths.py %build %python_build @@ -110,6 +105,19 @@ sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" jupyte %if !%{with test} %python_install +# Set the appropriate paths dynamically +%{python_expand # skip +sed -i "s|\"/usr/share//jupyter\"|\"%{_datadir}/jupyter/%{$python_bin_suffix}\"|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py +sed -i "s|\"/etc/jupyter\"|\"%{_sysconfdir}/jupyter/%{$python_bin_suffix}\"|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter', '%{$python_bin_suffix}')|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter', '%{$python_bin_suffix}')|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py +} + +%python_expand cat %{buildroot}%{$python_sitelib}/jupyter_core/paths.py | grep share +%python_expand cat %{buildroot}%{$python_sitelib}/jupyter_core/paths.py | grep etc + +sfsfsda + %{python_expand chmod a+x %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jupyter_core/ From b02f1fe0e76dc86c72e399597669f8135ddea17cf75dbb4e67f88de18d94d65b Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 6 Apr 2020 17:57:58 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=10 --- python-jupyter-core.spec | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/python-jupyter-core.spec b/python-jupyter-core.spec index 61ae1ff..c41223a 100644 --- a/python-jupyter-core.spec +++ b/python-jupyter-core.spec @@ -97,6 +97,11 @@ This package provides the jupyter components. %prep %setup -q -n jupyter_core-%{version} %patch0 -p1 +# Set the appropriate paths dynamically +sed -i "s|\"%{_datadir}/jupyter\"|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|\"%{_sysconfdir}/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" jupyter_core/paths.py +sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" jupyter_core/paths.py %build %python_build @@ -105,19 +110,6 @@ This package provides the jupyter components. %if !%{with test} %python_install -# Set the appropriate paths dynamically -%{python_expand # skip -sed -i "s|\"/usr/share//jupyter\"|\"%{_datadir}/jupyter/%{$python_bin_suffix}\"|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py -sed -i "s|\"/etc/jupyter\"|\"%{_sysconfdir}/jupyter/%{$python_bin_suffix}\"|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py -sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter', '%{$python_bin_suffix}')|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py -sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter', '%{$python_bin_suffix}')|" %{buildroot}%{$python_sitelib}/jupyter_core/paths.py -} - -%python_expand cat %{buildroot}%{$python_sitelib}/jupyter_core/paths.py | grep share -%python_expand cat %{buildroot}%{$python_sitelib}/jupyter_core/paths.py | grep etc - -sfsfsda - %{python_expand chmod a+x %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/jupyter_core/