#2 Restore Python 2 subpackages for older releases of Fedora and RHEL.
Opened a month ago by merlinm. Modified 12 days ago
rpms/ merlinm/python-stevedore master  into  master

file modified
+55 -1

@@ -1,11 +1,17 @@ 

  %{!?upstream_version: %global upstream_version %{version}%{?milestone}}

  

+ %if 0%{?fedora} > 30 || 0%{?rhel} > 7

+ %global with_python2 0

+ %else

+ %global with_python2 1

+ %{!?py2dir: %global py2dir %{_builddir}/python2-%{name}-%{version}-%{release}}

+ %endif

  

  %global common_desc Manage dynamic plugins for Python applications

  

  Name:           python-stevedore

  Version:        1.30.1

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        Manage dynamic plugins for Python applications

  

  Group:          Development/Languages

@@ -14,8 +20,16 @@ 

  Source0:        https://tarballs.openstack.org/stevedore/stevedore-%{upstream_version}.tar.gz

  BuildArch:      noarch

  

+ %if %{with_python2}

+ BuildRequires:  python2-devel

+ BuildRequires:  python2-setuptools

+ BuildRequires:  python2-pbr

+ BuildRequires:  python2-mock

+ BuildRequires:  python2-six

+ BuildRequires:  python2-testrepository

  #BuildRequires:  python2-discover

  #BuildRequires:  python2-oslotest

+ %endif

  

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

@@ -29,6 +43,19 @@ 

  %description

  %{common_desc}

  

+ %if %{with_python2}

+ %package -n python2-stevedore

+ Summary:        Manage dynamic plugins for Python applications

+ Group:          Development/Libraries

+ %{?python_provide:%python_provide python2-stevedore}

+ 

+ Requires:       python2-six

+ Requires:       python2-pbr

+ 

+ %description -n python2-stevedore

+ %{common_desc}

+ %endif

+ 

  %package -n python3-stevedore

  Summary:        Manage dynamic plugins for Python applications

  Group:          Development/Libraries

@@ -46,12 +73,28 @@ 

  # let RPM handle deps

  rm -f requirements.txt

  

+ %if %{with_python2}

+ rm -rf %{py2dir}

+ cp -a . %{py2dir}

+ %endif

  

  %build

  

+ %if %{with_python2}

+ pushd %{py2dir}

+ %{__python3} setup.py build

+ popd

+ %endif

+ 

  %{__python3} setup.py build

  

  %install

+ %if %{with_python2}

+ pushd %{py2dir}

+ %{__python2} setup.py install --skip-build --root=%{buildroot}

+ popd

+ %endif

+ 

  %{__python3} setup.py install -O1 --skip-build --root=%{buildroot}

  

  %check

@@ -63,6 +106,14 @@ 

  #PYTHONPATH=. nosetests-%{python3_version}

  #%endif

  

+ %if %{with_python2}

+ %files -n python2-stevedore

+ %license LICENSE

+ %doc README.rst

+ %{python2_sitelib}/stevedore

+ %{python2_sitelib}/stevedore-*.egg-info

+ %endif

+ 

  %files -n python3-stevedore

  %license LICENSE

  %doc README.rst

@@ -70,6 +121,9 @@ 

  %{python3_sitelib}/stevedore-*.egg-info

  

  %changelog

+ * Tue Oct 08 2019 Merlin Mathesius <mmathesi@redhat.com> - 1.30.1-5

+ - Restore Python 2 subpackages for older releases of Fedora and RHEL.

+ 

  * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.30.1-4

  - Rebuilt for Python 3.8.0rc1 (#1748018)

  

As reported in BZ 1751867, the recent release of python-stevedore-1.30.1-2.fc30 dropped python2-stevedore which is causing FTBFS for other Fedora 30 packages. This PR should correct that problem.

What about merging this only in f30 branch and keeping master free of python2 ?

What about merging this only in f30 branch and keeping master free of python2 ?

That decision is ultimately up to the package maintainer(s).

I created this PR to help expedite resolving the Bugzilla, and I prefer to maintain a common SPEC file across all supported releases of Fedora so it's obvious which releases should support which versions of Python, etc.

rebased onto 6edd1cf

12 days ago

I rebased this PR to account for a new commit to the master branch on Oct 03 2019.

Please consider merging it. The missing python2-stevedore in Fedora 30 is continuing to cause FTBFS for other packages.

If the package maintainer(s) wish to merge this only in the f30 branch, let me know and I will create a separate PR for that to help expedite a resolution to BZ 1751867.

Please open the PR on the f30 branch, as @apevec mentioned I think this is the best idea.

I'm +1 to merging the PR in f30.

PR #3 has been opened with this change for the f30 branch.

Thank you!