diff --git a/python-sherpa.changes b/python-sherpa.changes index 1b8a9dc..6c74879 100644 --- a/python-sherpa.changes +++ b/python-sherpa.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 19 09:28:01 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Mar 12 12:56:22 UTC 2020 - Atri Bhattacharya diff --git a/python-sherpa.spec b/python-sherpa.spec index b4a0a54..7f126b7 100644 --- a/python-sherpa.spec +++ b/python-sherpa.spec @@ -41,6 +41,8 @@ BuildRequires: gcc-fortran BuildRequires: python-rpm-macros Requires: python-numpy Requires: python-six +Requires(post): update-alternatives +Requires(postun): update-alternatives ExcludeArch: %{ix86} # SECTION test requirements BuildRequires: %{python_module mock} @@ -74,6 +76,8 @@ sed -i 's|group-location=.*|group-location=build/%{_lib}/python%{$python_version sed -i 's|group-location=.*|group-location=build/%{_lib}/python%{$python_version}/site-packages/group.so|' setup.cfg %{$python_install} } +%python_clone -a %{buildroot}%{_bindir}/sherpa_test +%python_clone -a %{buildroot}%{_bindir}/sherpa_smoke %python_expand %fdupes %{buildroot}%{$python_sitearch} # REMOVE HASHBANGS FROM NON-EXEC FILES @@ -90,11 +94,19 @@ ls -l *build*/*/*/ %pytest_arch %{buildroot}%{$python_sitearch}/sherpa/ mv sherpa_temp sherpa +%post +%python_install_alternative sherpa_smoke +%python_install_alternative sherpa_test + +%postun +%python_uninstall_alternative sherpa_smoke +%python_uninstall_alternative sherpa_test + %files %{python_files} %doc README.md %license LICENSE -%python3_only %{_bindir}/sherpa_test -%python3_only %{_bindir}/sherpa_smoke +%python_alternative %{_bindir}/sherpa_test +%python_alternative %{_bindir}/sherpa_smoke %{python_sitearch}/* %changelog