- Also still install f2py<PYTHON_MAJOR> that is used by many other

depending software

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=51
This commit is contained in:
Tomáš Chvátal 2020-04-07 11:56:09 +00:00 committed by Git OBS Bridge
parent 3756b8af42
commit 4a25d3a4dc
2 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Apr 7 11:55:43 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Also still install f2py<PYTHON_MAJOR> that is used by many other
depending software
-------------------------------------------------------------------
Mon Apr 6 21:42:29 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@ -191,8 +191,8 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%{?with_hpc:module load openblas}
%python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot}
%python_clone -a %{buildroot}%{p_prefix}/bin/f2py
rm -v %{buildroot}%{p_prefix}/bin/f2py3*
%prepare_alternative f2py
%if 0%{?suse_version}
%fdupes %{buildroot}%{p_prefix}
@ -257,14 +257,19 @@ popd
%endif
%post
%python_install_alternative f2py
# can't use `python_install_alternative` because it also installs f2py3
PRIO=$(echo %{python_version} | tr -d .)
%install_alternative f2py %{_bindir}/f2py%{python_version} $PRIO
%postun
%python_uninstall_alternative f2py
%uninstall_alternative f2py %{_bindir}/f2py%{python_version}
%files %{python_files}
%doc README.md THANKS.txt
%python_alternative %{p_bindir}/f2py
%ghost %{_sysconfdir}/alternatives/f2py
%{p_bindir}/f2py
%{p_bindir}/f2py%{python_version}
%python3_only %{p_bindir}/f2py3
%if %{without hpc}
%{python_sitearch}/numpy/
%{python_sitearch}/numpy-%{version}-py*.egg-info