1
0

Accepting request 923224 from home:schubi2

- Use libalternatives instead of update-alternatives.
- Added BuildRequires:  alts

OBS-URL: https://build.opensuse.org/request/show/923224
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-ipython?expand=0&rev=71
This commit is contained in:
Matej Cepl 2021-10-05 22:23:25 +00:00 committed by Git OBS Bridge
parent 36097363ec
commit 0686c7f7e0
2 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Oct 4 08:59:34 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 15 05:36:58 UTC 2021 - Arun Persaud <arun@gmx.de> Wed Sep 15 05:36:58 UTC 2021 - Arun Persaud <arun@gmx.de>

View File

@ -1,5 +1,5 @@
# #
# spec file # spec file for package python-ipython
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
@ -16,6 +16,12 @@
# #
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test" %if "%{flavor}" == "test"
%define psuffix -test %define psuffix -test
@ -42,7 +48,7 @@ BuildRequires: %{python_module backcall}
BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools >= 18.5} BuildRequires: %{python_module setuptools >= 18.5}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros >= 20210929
Requires: python-Pygments Requires: python-Pygments
Requires: python-backcall Requires: python-backcall
Requires: python-base >= 3.7 Requires: python-base >= 3.7
@ -82,8 +88,13 @@ BuildRequires: %{python_module ipython-iptest = %{version}}
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives
%endif
%if %{with ico} %if %{with ico}
BuildRequires: icoutils BuildRequires: icoutils
%endif %endif
@ -216,6 +227,15 @@ popd
%endif %endif
%if !%{with test} %if !%{with test}
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative ipython
%pre iptest
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative iptest
%post %post
%python_install_alternative ipython ipython3 ipython.1.gz ipython3.1.gz %python_install_alternative ipython ipython3 ipython.1.gz ipython3.1.gz
%desktop_database_post %desktop_database_post
@ -254,7 +274,6 @@ popd
%files %{python_files iptest} %files %{python_files iptest}
%python_alternative %{_bindir}/iptest %python_alternative %{_bindir}/iptest
%python_alternative %{_bindir}/iptest3 %python_alternative %{_bindir}/iptest3
%endif %endif
%endif %endif