forked from pool/python-wheel
Accepting request 920165 from devel:languages:python
revert OBS-URL: https://build.opensuse.org/request/show/920165 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=52
This commit is contained in:
parent
754663fa76
commit
b4c7a82cff
@ -1,8 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Thu Sep 9 13:05:13 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
|
||||||
|
|
||||||
- Use libalternatives instead of update-alternatives.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 28 23:25:52 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Thu Jan 28 23:25:52 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -16,13 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
%if 0%{?suse_version} > 1500
|
|
||||||
%bcond_without libalternatives
|
|
||||||
%else
|
|
||||||
%bcond_with libalternatives
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
@ -44,12 +37,8 @@ BuildRequires: %{python_module setuptools}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
%if %{with libalternatives}
|
|
||||||
Requires: alts
|
|
||||||
%else
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
%endif
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
@ -80,15 +69,7 @@ sed -i '/addopts = /d' setup.cfg
|
|||||||
%install
|
%install
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%if ! %{with libalternatives}
|
%python_clone -a %{buildroot}%{_bindir}/wheel
|
||||||
%python_clone -a %{buildroot}%{_bindir}/wheel
|
|
||||||
%else
|
|
||||||
%python_clone %{buildroot}%{_bindir}/wheel
|
|
||||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/wheel
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/wheel
|
|
||||||
%python_expand content="binary=%{_bindir}/wheel-%{$python_version}"
|
|
||||||
%python_expand echo -e $content > %{buildroot}%{_datadir}/libalternatives/wheel/10%{$python_version_nodots}.conf
|
|
||||||
%endif
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -100,32 +81,16 @@ export PYTHONDONTWRITEBYTECODE=1
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%if %{with libalternatives}
|
|
||||||
%pre
|
|
||||||
# removing old update-alternatives entries
|
|
||||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
|
||||||
%python_uninstall_alternative wheel
|
|
||||||
fi
|
|
||||||
%else
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative wheel
|
%python_install_alternative wheel
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative wheel
|
%python_uninstall_alternative wheel
|
||||||
%endif
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc docs/news.rst README.rst
|
%doc docs/news.rst README.rst
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%if ! 0%{with libalternatives}
|
|
||||||
%python_alternative %{_bindir}/wheel
|
%python_alternative %{_bindir}/wheel
|
||||||
%else
|
|
||||||
%dir %{_datadir}/libalternatives
|
|
||||||
%dir %{_datadir}/libalternatives/wheel
|
|
||||||
%{_datadir}/libalternatives/wheel/10%python_version_nodots.conf
|
|
||||||
%{_bindir}/wheel
|
|
||||||
%{_bindir}/wheel-%python_version
|
|
||||||
%endif
|
|
||||||
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
|
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
|
||||||
%{python_sitelib}/wheel/
|
%{python_sitelib}/wheel/
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user