diff --git a/.gitignore b/.gitignore index 8a1a78e..523fe40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /python-designateclient-2.0.0.tar.gz /python-designateclient-2.3.0.tar.gz /python-designateclient-2.9.0.tar.gz +/python-designateclient-2.11.0.tar.gz diff --git a/python-designateclient.spec b/python-designateclient.spec index 7efae9e..00acafb 100644 --- a/python-designateclient.spec +++ b/python-designateclient.spec @@ -1,21 +1,27 @@ +# Macros for py2/py3 compatibility +%if 0%{?fedora} || 0%{?rhel} > 7 +%global pyver %{python3_pkgversion} +%else +%global pyver 2 +%endif + +%global pyver_bin python%{pyver} +%global pyver_sitelib %python%{pyver}_sitelib +%global pyver_install %py%{pyver}_install +%global pyver_build %py%{pyver}_build +# End of macros for py2/py3 compatibility + %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global with_doc 1 %global common_desc \ Client library and command line utility for interacting with Openstack Designate API %global sname designateclient -%if 0%{?fedora} -%bcond_with python2 -%bcond_without python3 -%else -%bcond_without python2 -%bcond_with python3 -%endif - Name: python-%{sname} -Version: 2.9.0 -Release: 3%{?dist} +Version: 2.11.0 +Release: 1%{?dist} Summary: Python API and CLI for OpenStack Designate License: ASL 2.0 @@ -29,185 +35,91 @@ BuildRequires: git %description %{common_desc} -%if %{with python2} -%package -n python2-%{sname} +%package -n python%{pyver}-%{sname} Summary: Python API and CLI for OpenStack Designate -%{?python_provide:%python_provide python2-%{sname}} - -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-pbr - -Requires: python2-pbr -Requires: python2-keystoneauth1 >= 3.3.0 -Requires: python2-requests >= 2.14.2 -Requires: python2-six >= 1.10.0 -Requires: python2-stevedore -Requires: python2-osc-lib >= 1.8.0 -Requires: python2-debtcollector -Requires: python2-oslo-utils >= 3.33.0 -%if 0%{?fedora} > 0 -Requires: python2-cliff -Requires: python2-jsonschema >= 2.6.0 -%else -Requires: python-cliff -Requires: python-jsonschema >= 2.6.0 -%endif - -%description -n python2-%{sname} +%{?python_provide:%python_provide python%{pyver}-%{sname}} + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-setuptools +BuildRequires: python%{pyver}-pbr + +Requires: python%{pyver}-pbr +Requires: python%{pyver}-keystoneauth1 >= 3.4.0 +Requires: python%{pyver}-requests >= 2.14.2 +Requires: python%{pyver}-six >= 1.10.0 +Requires: python%{pyver}-stevedore +Requires: python%{pyver}-osc-lib >= 1.8.0 +Requires: python%{pyver}-debtcollector +Requires: python%{pyver}-oslo-utils >= 3.33.0 +Requires: python%{pyver}-oslo-serialization >= 2.18.0 +Requires: python%{pyver}-cliff +Requires: python%{pyver}-jsonschema >= 2.6.0 + +%description -n python%{pyver}-%{sname} %{common_desc} -%package -n python2-%{sname}-tests +%package -n python%{pyver}-%{sname}-tests Summary: Python API and CLI for OpenStack Designate (tests) -%{?python_provide:%python_provide python2-%{sname}-tests} -Requires: python2-%{sname} = %{version}-%{release} +%{?python_provide:%python_provide python%{pyver}-%{sname}-tests} +Requires: python%{pyver}-%{sname} = %{version}-%{release} -%description -n python2-%{sname}-tests +%description -n python%{pyver}-%{sname}-tests %{common_desc} This package contains Designate client tests files. -%endif - - -%if 0%{?with_python3} -%package -n python3-%{sname} -Summary: Python API and CLI for OpenStack Designate -%{?python_provide:%python_provide python3-%{sname}} -# We need to Obsolete python2 to ensure upgrade path -Obsoletes: python2-%{sname} < %{version}-%{release} - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr - -Requires: python3-cliff -Requires: python3-jsonschema >= 2.6.0 -Requires: python3-pbr -Requires: python3-keystoneauth1 >= 3.3.0 -Requires: python3-requests >= 2.14.2 -Requires: python3-six >= 1.10.0 -Requires: python3-stevedore -Requires: python3-osc-lib >= 1.8.0 -Requires: python3-debtcollector -Requires: python3-oslo-utils >= 3.33.0 - -%description -n python3-%{sname} -%{common_desc} - - -%package -n python3-%{sname}-tests -Summary: Python API and CLI for OpenStack Designate (tests) -%{?python_provide:%python_provide python3-%{sname}-tests} -Requires: python3-%{sname} = %{version}-%{release} - -%description -n python3-%{sname}-tests -%{common_desc} - -This package contains Designate client tests files. -%endif - +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Designate API Client -%if %{with python2} -BuildRequires: python2-sphinx -BuildRequires: python2-openstackdocstheme -BuildRequires: python2-keystoneauth1 -BuildRequires: python2-osc-lib -%if 0%{?fedora} > 0 -BuildRequires: python2-jsonschema -%else -BuildRequires: python-jsonschema -%endif -%else -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-osc-lib -BuildRequires: python3-jsonschema -%endif +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-openstackdocstheme +BuildRequires: python%{pyver}-keystoneauth1 +BuildRequires: python%{pyver}-osc-lib +BuildRequires: python%{pyver}-jsonschema %description doc %{common_desc} This package contains auto-generated documentation. +%endif %prep %autosetup -n %{name}-%{upstream_version} -S git -rm -rf {,test-}requirements.txt +rm -rf *requirements.txt %build -%if %{with python2} -%py2_build -%endif -%if 0%{?with_python3} -%py3_build -%endif +%{pyver_build} -%install -%if 0%{?with_python3} -%py3_install -mv %{buildroot}%{_bindir}/designate %{buildroot}%{_bindir}/designate-%{python3_version} -ln -s ./designate-%{python3_version} %{buildroot}%{_bindir}/designate-3 -ln -s ./designate-3 %{buildroot}%{_bindir}/designate - -%{__python3} setup.py build_sphinx -b html +%if 0%{?with_doc} +%{pyver_bin} setup.py build_sphinx -b html %endif -%if %{with python2} -%py2_install -mv %{buildroot}%{_bindir}/designate %{buildroot}%{_bindir}/designate-%{python2_version} -ln -s ./designate-%{python2_version} %{buildroot}%{_bindir}/designate-2 - -ln -s ./designate-2 %{buildroot}%{_bindir}/designate +%install +%{pyver_install} -%{__python2} setup.py build_sphinx -b html -%endif +%files -n python%{pyver}-%{sname} -%if %{with python2} -%files -n python2-%{sname} %doc README.rst %license LICENSE -%{python2_sitelib}/designateclient -%exclude %{python2_sitelib}/%{sname}/tests -%{python2_sitelib}/*.egg-info -%{_bindir}/designate -%{_bindir}/designate-2 -%{_bindir}/designate-%{python2_version} -%files -n python2-%{sname}-tests -%{python2_sitelib}/%{sname}/tests -%endif - -%if 0%{?with_python3} -%files -n python3-%{sname} -%license LICENSE -%doc README.rst -%{python3_sitelib}/%{sname} -%exclude %{python3_sitelib}/%{sname}/tests -%{python3_sitelib}/*.egg-info +%{pyver_sitelib}/designateclient +%exclude %{pyver_sitelib}/%{sname}/tests +%{pyver_sitelib}/*.egg-info %{_bindir}/designate -%{_bindir}/designate-3 -%{_bindir}/designate-%{python3_version} -%files -n python3-%{sname}-tests -%{python3_sitelib}/%{sname}/tests -%endif +%files -n python%{pyver}-%{sname}-tests +%{pyver_sitelib}/%{sname}/tests +%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE +%endif %changelog -* Sat Feb 02 2019 Fedora Release Engineering - 2.9.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Dec 03 2018 Alfredo Moralejo 2.9.0-2 -- Remove python2 subpackages. - -* Sun Feb 11 2018 RDO 2.9.0-1 -- Update to 2.9.0 +* Tue Mar 12 2019 RDO 2.11.0-1 +- Update to 2.11.0 diff --git a/sources b/sources index 94a5a95..1f39891 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-designateclient-2.9.0.tar.gz) = 04460395cf1b76d8628001e185e9301cc4964e06a61576268beffe5fbc42196e1c4015d0f273357fb93fb7b5079975e356eb25fb144cd4c1d355e704a1948e9c +SHA512 (python-designateclient-2.11.0.tar.gz) = ba01da49100a7ddddb9394291babdbabbd1813db3fe3cb2ebd5e2be251795c7aaa8e5ea15e455ec4322a5a0481e6670bf59add49e91bf6799c748711c54e1975