1
0
Todd R
2020-04-05 19:00:36 +00:00
committed by Git OBS Bridge
parent be453b8210
commit 9ef6e37c26

View File

@@ -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/