#3 Drop python2 sub packages (#1632343)
Merged 5 years ago by amoralej. Opened 5 years ago by ykarel.
rpms/ ykarel/python-oslo-service master  into  master

file modified
+4 -116
@@ -2,9 +2,6 @@ 

  %global pypi_name oslo.service

  %global pname oslo-service

  %global with_doc 1

- %if 0%{?fedora} >= 24

- %global with_python3 1

- %endif

  

  %global common_desc \

  Library for running OpenStack services
@@ -14,7 +11,7 @@ 

  

  Name:           python-%{pname}

  Version:        1.29.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Oslo service library

  

  License:        ASL 2.0
@@ -22,85 +19,9 @@ 

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

  BuildArch:      noarch

  

- %package -n     python2-%{pname}

- Summary:        Oslo service library

- %{?python_provide:%python_provide python2-%{pname}}

- 

- BuildRequires:  python2-devel

- BuildRequires:  python2-setuptools

- BuildRequires:  python2-pbr >= 2.0.0

  BuildRequires:  git

- BuildRequires:  python2-oslo-i18n

- BuildRequires:  python2-eventlet

- BuildRequires:  python2-six

- # Required for documentation build

- BuildRequires:  python2-oslo-config

- # Required for tests

- BuildRequires:  procps-ng

- BuildRequires:  python2-fixtures

- BuildRequires:  python2-hacking

- BuildRequires:  python2-mock

- BuildRequires:  python2-requests

- BuildRequires:  python2-routes

- BuildRequires:  python2-oslotest

- BuildRequires:  python2-oslo-log

- BuildRequires:  python2-oslo-utils

- BuildRequires:  python2-oslo-concurrency

- %if 0%{?fedora} > 0

- BuildRequires:  python2-paste

- BuildRequires:  python2-paste-deploy

- BuildRequires:  python2-monotonic

- BuildRequires:  python2-webob

- %else

- BuildRequires:  python-paste

- BuildRequires:  python-paste-deploy

- BuildRequires:  python-monotonic

- BuildRequires:  python-webob

- %endif

- 

- Requires:       python2-eventlet >= 0.18.2

- Requires:       python2-greenlet

- Requires:       python2-oslo-config >= 2:5.1.0

- Requires:       python2-oslo-concurrency >= 3.25.0

- Requires:       python2-oslo-i18n >= 3.15.3

- Requires:       python2-oslo-log >= 3.36.0

- Requires:       python2-oslo-utils >= 3.33.0

- Requires:       python2-routes

- Requires:       python2-six >= 1.10.0

- %if 0%{?fedora} > 0

- Requires:       python2-paste

- Requires:       python2-paste-deploy >= 1.5.0

- Requires:       python2-monotonic >= 0.6

- Requires:       python2-webob

- %else

- Requires:       python-paste

- Requires:       python-paste-deploy >= 1.5.0

- Requires:       python-monotonic >= 0.6

- Requires:       python-webob

- %endif

- 

- 

- %description -n python2-%{pname}

- %{common_desc}

- 

- %package -n python2-%{pname}-tests

- Summary:        Oslo service tests

- %{?python_provide:%python_provide python2-%{pname}-tests}

- 

- Requires:  python2-%{pname} = %{version}-%{release}

- Requires:  procps-ng

- Requires:  python2-fixtures

- Requires:  python2-hacking

- Requires:  python2-mock

- Requires:  python2-requests

- Requires:  python2-routes

- Requires:  python2-oslotest

- 

- %description -n python2-%{pname}-tests

- %{common_desc1}

  

  

- %if 0%{?with_python3}

  %package -n     python3-%{pname}

  Summary:        Oslo service library

  %{?python_provide:%python_provide python3-%{pname}}
@@ -157,19 +78,13 @@ 

  

  %description -n python3-%{pname}-tests

  %{common_desc1}

- %endif

  

  %if 0%{?with_doc}

  %package -n python-%{pname}-doc

  Summary:        Oslo service documentation

  

- %if 0%{?with_python3}

  BuildRequires:  python3-sphinx

  BuildRequires:  python3-openstackdocstheme

- %else

- BuildRequires:  python2-sphinx

- BuildRequires:  python2-openstackdocstheme

- %endif

  

  %description -n python-%{pname}-doc

  Documentation for oslo.service
@@ -182,52 +97,23 @@ 

  %autosetup -n %{pypi_name}-%{upstream_version} -S git

  

  %build

- %py2_build

- %if 0%{?with_python3}

  %py3_build

- %endif

  

  %if 0%{?with_doc}

  # generate html docs

- %if 0%{?with_python3}

  %{__python3} setup.py build_sphinx -b html

- %else

- %{__python2} setup.py build_sphinx -b html

- %endif

  # remove the sphinx-build leftovers

  rm -rf doc/build/html/.{doctrees,buildinfo}

  %endif

  

  %install

- # Must do the subpackages' install first because the scripts in /usr/bin are

- # overwritten with every setup.py install.

- %if 0%{?with_python3}

  %py3_install

- %endif

- %py2_install

  

  %check

- %if 0%{?with_python3}

  export PYTHON=%{__python3}

  %{__python3} setup.py test ||

  rm -rf .testrepository

- %endif

- # FIXME: https://review.openstack.org/279011 seems to break tests in CentOS7,

- # creating an infinite loop

- export PYTHON=%{__python2}

- # %{__python2} setup.py test ||

- 

- %files -n python2-%{pname}

- %doc README.rst

- %license LICENSE

- %{python2_sitelib}/oslo_service

- %{python2_sitelib}/*.egg-info

- %exclude %{python2_sitelib}/oslo_service/tests

  

- %files -n python2-%{pname}-tests

- %{python2_sitelib}/oslo_service/tests

- 

- %if 0%{?with_python3}

  %files -n python3-%{pname}

  %doc README.rst

  %license LICENSE
@@ -237,13 +123,15 @@ 

  

  %files -n python3-%{pname}-tests

  %{python3_sitelib}/oslo_service/tests

- %endif

  

  %files -n python-%{pname}-doc

  %doc doc/build/html

  %license LICENSE

  

  %changelog

+ * Thu Jan 31 2019 Yatin Karel <ykarel@redhat.com> - 1.29.0-2

+ - Drop python2 sub packages (#1632343)

+ 

  * Mon Jul 23 2018 Matthias Runge <mrunge@redhat.com> - 1.29.0-1

  - update to Queens

  

no initial comment

The same here, looks good, happy to drop, but coordinate with:

$ dnf repoquery --repo=rawhide --repo=rawhide-source --whatrequires python2-oslo-service
python-oslo-messaging-0:5.35.1-1.fc30.src
python2-oslo-messaging-0:5.35.1-1.fc30.noarch
python2-oslo-messaging-tests-0:5.35.1-1.fc30.noarch
python2-oslo-service-tests-0:1.29.0-1.fc29.noarch

$ dnf repoquery --repo=rawhide --repo=rawhide-source --whatrequires python2-oslo-messaging
python2-networking-bigswitch-0:2015.3.12-5.fc29.noarch
python2-oslo-messaging-tests-0:5.35.1-1.fc30.noarch

bigswitch is retired, all other oslo-* can be dropped as they're not used by openstack clients

oslo-messaging can't be retired, so let's merge and remove python2

Pull-Request has been merged by amoralej

5 years ago