Accepting request 922595 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/922595 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:flask/python-Flask?expand=0&rev=16
This commit is contained in:
parent
60a0f06307
commit
e46f4877e9
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 22 19:07:48 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 19 07:28:01 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
||||
|
||||
|
@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%define oldpython python
|
||||
%define skip_python2 1
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
@ -35,13 +41,17 @@ BuildRequires: %{python_module itsdangerous >= 2.0}
|
||||
BuildRequires: %{python_module pytest >= 6.2.4}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python-rpm-macros >= 20210929
|
||||
Requires: python-Jinja2 >= 3.0
|
||||
Requires: python-Werkzeug >= 2.0
|
||||
Requires: python-click >= 7.1.2
|
||||
Requires: python-itsdangerous >= 2.0
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%if %{?suse_version} < 1500
|
||||
BuildRequires: python
|
||||
@ -71,13 +81,16 @@ reference for python-Flask.
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/flask
|
||||
|
||||
%fdupes %{buildroot}%{python_sitelib}
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
%pytest
|
||||
|
||||
%pre
|
||||
# If libalternatives is used: Removing old update-alternatives entries.
|
||||
%python_libalternatives_reset_alternative flask
|
||||
|
||||
%post
|
||||
%python_install_alternative flask
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user