forked from pool/python-jupyter-core
This commit is contained in:
@@ -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/
|
||||
|
Reference in New Issue
Block a user