From 19e497cb573f80db5b03ca403c345fc5cacefaee Mon Sep 17 00:00:00 2001 From: Merlin Mathesius Date: Thu, 23 May 2019 10:39:56 -0500 Subject: [PATCH] pyliblzma is Python 2-only and no longer available as of F31. Unversioned executables should now be Python 3. Signed-off-by: Merlin Mathesius --- python-avocado.spec | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/python-avocado.spec b/python-avocado.spec index 6e807bc..9dd4415 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -71,7 +71,7 @@ Name: python-%{pkgname} Version: 69.0 -Release: 3%{?gitrel}%{?dist} +Release: 4%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing Group: Development/Tools # Found licenses: @@ -337,13 +337,14 @@ popd # ditto for libexec files %{__rm} -rf %{buildroot}%{python3_sitelib}/avocado/libexec %endif -%if %{with python2} -# unversioned executables must be the python2 version if shipping with python2 -%{__ln_s} avocado-%{python2_version} %{buildroot}%{_bindir}/avocado -%{__ln_s} avocado-rest-client-%{python2_version} %{buildroot}%{_bindir}/avocado-rest-client -%else +%if %{with python3} +# Unversioned executables should now be the Python 3 version if shipping with Python 3 +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/ %{__ln_s} avocado-%{python3_version} %{buildroot}%{_bindir}/avocado %{__ln_s} avocado-rest-client-%{python3_version} %{buildroot}%{_bindir}/avocado-rest-client +%else +%{__ln_s} avocado-%{python2_version} %{buildroot}%{_bindir}/avocado +%{__ln_s} avocado-rest-client-%{python2_version} %{buildroot}%{_bindir}/avocado-rest-client %endif pushd optional_plugins/html %if %{with python2} @@ -596,7 +597,6 @@ Requires: python-%{pkgname}-common == %{version}-%{release} Requires: gdb Requires: gdb-gdbserver Requires: procps-ng -Requires: pyliblzma Requires: python2 Requires: python2-requests Requires: python2-setuptools @@ -613,6 +613,10 @@ Requires: python-stevedore # See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal Requires: python2-pycdlib %endif +%if 0%{?fedora} && 0%{?fedora} <= 30 +# More Python2 binary packages removed +Requires: pyliblzma +%endif %description -n python2-%{pkgname} Avocado is a set of tools and libraries (what people call @@ -625,11 +629,13 @@ these days a framework) to perform automated testing. %{python2_sitelib}/avocado_framework-%{version}-py%{python2_version}.egg-info %{_bindir}/avocado-%{python2_version} %{_bindir}/avocado-2 -%{_bindir}/avocado %{_bindir}/avocado-rest-client-%{python2_version} %{_bindir}/avocado-rest-client-2 +%if %{without python3} +%{_bindir}/avocado %{_bindir}/avocado-rest-client %endif +%endif %if %{with python3} %package -n python3-%{pkgname} @@ -640,7 +646,6 @@ Requires: python-%{pkgname}-common == %{version}-%{release} Requires: gdb Requires: gdb-gdbserver Requires: procps-ng -Requires: pyliblzma Requires: python3 Requires: python3-pycdlib Requires: python3-requests @@ -659,13 +664,11 @@ these days a framework) to perform automated testing. %{python3_sitelib}/avocado_framework-%{version}-py%{python3_version}.egg-info %{_bindir}/avocado-%{python3_version} %{_bindir}/avocado-3 +%{_bindir}/avocado %{_bindir}/avocado-rest-client-%{python3_version} %{_bindir}/avocado-rest-client-3 -%if %{without python2} -%{_bindir}/avocado %{_bindir}/avocado-rest-client %endif -%endif %package -n python-%{pkgname}-common @@ -1167,6 +1170,10 @@ Again Shell code (and possibly other similar shells). %changelog +* Wed May 22 2019 Merlin Mathesius - 69.0-4 +- pyliblzma is Python 2-only and no longer available as of F31. +- Unversioned executables should now be Python 3. + * Mon May 20 2019 Merlin Mathesius - 69.0-3 - Drop Python 2 support from F31 and RHEL8 onward. - Disable components dependent upon Fiber in Fedora 31 and later,