diff --git a/.gitignore b/.gitignore index 40dcd4f..2b9560c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /python-congressclient-1.2.3.tar.gz /python-congressclient-1.3.0.tar.gz /python-congressclient-1.5.0.tar.gz +/python-congressclient-1.12.0.tar.gz diff --git a/python-congressclient.spec b/python-congressclient.spec index 2b38f55..59afbf1 100644 --- a/python-congressclient.spec +++ b/python-congressclient.spec @@ -1,11 +1,24 @@ +# 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 %global pypi_name congressclient - %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global common_desc \ +Client for OpenStack Congress (Open Policy Framework) + Name: python-%{pypi_name} -Version: 1.5.0 -Release: 10%{?dist} +Version: 1.12.0 +Release: 1%{?dist} Summary: Client for OpenStack Congress (Open Policy Framework) License: ASL 2.0 @@ -14,138 +27,106 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: git + %description -Client for OpenStack Congress (Open Policy Framework) +%{common_desc} + +%package -n python%{pyver}-%{pypi_name} + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-setuptools +BuildRequires: python%{pyver}-pbr >= 2.0.0 +BuildRequires: python%{pyver}-keystoneauth1 +BuildRequires: python%{pyver}-mock +BuildRequires: python%{pyver}-oslo-log +BuildRequires: python%{pyver}-cliff +BuildRequires: python%{pyver}-fixtures + +Requires: python%{pyver}-babel >= 2.3.4 +Requires: python%{pyver}-keystoneauth1 >= 3.4.0 +Requires: python%{pyver}-oslo-i18n >= 3.15.3 +Requires: python%{pyver}-oslo-log >= 3.36.0 +Requires: python%{pyver}-oslo-serialization >= 2.18.0 +Requires: python%{pyver}-pbr >= 2.0.0 +Requires: python%{pyver}-six >= 1.10.0 +Requires: python%{pyver}-cliff >= 2.8.0 -%package -n python3-%{pypi_name} Summary: Client for OpenStack Congress (Open Policy Framework) -%{?python_provide:%python_provide python3-%{pypi_name}} - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr >= 1.6 -BuildRequires: python3-cliff -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-mock -BuildRequires: python3-oslo-log - -Requires: python3-babel >= 2.3.4 -Requires: python3-cliff >= 1.15.0 -Requires: python3-keystoneauth1 >= 2.10.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-log >= 1.14.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.16.0 -Requires: python3-pbr >= 1.6 -Requires: python3-requests >= 2.5.2 -Requires: python3-six >= 1.9.0 - -%description -n python3-%{pypi_name} -Client for OpenStack Congress (Open Policy Framework) +%{?python_provide:%python_provide python%{pyver}-%{pypi_name}} + +%description -n python%{pyver}-%{pypi_name} +%{common_desc} # Documentation package -%package -n python-%{pypi_name}-doc +%package -n python%{pyver}-%{pypi_name}-doc Summary: Documentation for OpenStack Congress Client +%{?python_provide:%python_provide python%{pyver}-%{pypi_name}-doc} -BuildRequires: python3-sphinx -BuildRequires: python3-oslo-sphinx >= 2.3.0 +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-sphinxcontrib-apidoc +BuildRequires: python%{pyver}-openstackdocstheme -%description -n python-%{pypi_name}-doc +%description -n python%{pyver}-%{pypi_name}-doc Documentation for the client library for interacting with Openstack Congress API. # Documentation package -%package -n python3-%{pypi_name}-tests +%package -n python%{pyver}-%{pypi_name}-tests Summary: congressclient test subpackage -Requires: python3-%{pypi_name} = %{version}-%{release} -Requires: python3-coverage >= 3.6 -Requires: python3-fixtures >= 1.3.1 -Requires: python3-mock -Requires: python3-testrepository >= 0.0.18 -Requires: python3-testscenarios >= 0.4 -Requires: python3-testtools -Requires: python3-oslo-sphinx >= 2.5.0 -Requires: python3-sphinx -Requires: python3-subunit >= 0.0.18 -Requires: python3-webob >= 1.2.3 - -%description -n python3-%{pypi_name}-tests -Test suite for OpenStack Congress (Open Policy Framework) client. +Requires: python%{pyver}-%{pypi_name} = %{version}-%{release} +Requires: python%{pyver}-fixtures >= 1.3.1 +Requires: python%{pyver}-mock +Requires: python%{pyver}-testtools +Requires: python%{pyver}-subunit >= 0.0.18 +Requires: python%{pyver}-testrepository >= 0.0.18 +Requires: python%{pyver}-testscenarios >= 0.4 +Requires: python%{pyver}-webob >= 1.2.3 +%description -n python%{pyver}-%{pypi_name}-tests +Test suite for OpenStack Congress (Open Policy Framework) client. %prep -%autosetup -n %{name}-%{upstream_version} +%autosetup -n %{name}-%{upstream_version} -S git # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Let RPM handle the dependencies -rm -f test-requirements.txt requirements.txt +rm -rf *requirements.txt %build -%py3_build - -# generate html docs -sphinx-build doc/source html -# remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} - +%{pyver_build} %install -%py3_install +%{pyver_install} +# generate html docs +sphinx-build-%{pyver} -b html doc/source doc/build/html +# remove the sphinx-build-%{pyver} leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} %check -%{__python3} setup.py test -rm -rf .testrepository +%{pyver_bin} setup.py test -%files -n python3-%{pypi_name} +%files -n python%{pyver}-%{pypi_name} %license LICENSE %doc README.rst -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/python_%{pypi_name}-*-py?.?.egg-info -%exclude %{python3_sitelib}/%{pypi_name}/tests +%{pyver_sitelib}/%{pypi_name} +%{pyver_sitelib}/python_%{pypi_name}-*-py?.?.egg-info +%exclude %{pyver_sitelib}/%{pypi_name}/tests -%files -n python-%{pypi_name}-doc -%doc html +%files -n python%{pyver}-%{pypi_name}-doc +%doc doc/build/html %license LICENSE -%files -n python3-%{pypi_name}-tests -%{python3_sitelib}/%{pypi_name}/tests - +%files -n python%{pyver}-%{pypi_name}-tests +%{pyver_sitelib}/%{pypi_name}/tests %changelog -* Sat Feb 02 2019 Fedora Release Engineering - 1.5.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 1.5.0-9 -- Drop explicit locale setting - See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot - -* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek - 1.5.0-8 -- Subpackages python2-congressclient, python2-congressclient-tests have been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Fri Jul 13 2018 Fedora Release Engineering - 1.5.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 1.5.0-6 -- Rebuilt for Python 3.7 - -* Fri Feb 09 2018 Fedora Release Engineering - 1.5.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.5.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 1.5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Dec 19 2016 Miro Hrončok - 1.5.0-2 -- Rebuild for Python 3.6 - -* Tue Sep 13 2016 Haikel Guemar 1.5.0-1 -- Update to 1.5.0 +* Tue Mar 12 2019 RDO 1.12.0-1 +- Update to 1.12.0 +- Add fixtures as BuildRequries diff --git a/sources b/sources index b4e7c5c..967331e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -78761f6fd555550f7b0290ec9a97b681 python-congressclient-1.5.0.tar.gz +SHA512 (python-congressclient-1.12.0.tar.gz) = 88a9b840726bf04353008ff12a479700abc85df201ad97af91ccaffd57fe9e82963c824492fdea5f0c1a320d25300123f22b67131273c3f2c4d6be321bc3e392