Accepting request 923312 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/923312 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=78
This commit is contained in:
parent
3ee1378582
commit
49e9ec500a
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 9 08:48:02 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 15 05:11:04 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
Thu Jul 15 05:11:04 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-Pygments
|
Name: python-Pygments
|
||||||
@ -33,10 +40,15 @@ BuildRequires: %{python_module base >= 3.5}
|
|||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
|
%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
|
||||||
Provides: python-pygments = %{version}
|
Provides: python-pygments = %{version}
|
||||||
Obsoletes: python-pygments < %{version}
|
Obsoletes: python-pygments < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -74,6 +86,10 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1
|
|||||||
|
|
||||||
%prepare_alternative pygmentize
|
%prepare_alternative pygmentize
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative pygmentize
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{python_install_alternative pygmentize pygmentize.1}
|
%{python_install_alternative pygmentize pygmentize.1}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user