From f42b2c3a4166ed023a3245c190c73848d1678348 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Nov 08 2019 11:16:53 +0000 Subject: Sync from RDO train release --- diff --git a/.gitignore b/.gitignore index e9c7a8a..1c63164 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /openstacksdk-0.11.3.tar.gz /openstacksdk-0.12.0.tar.gz /openstacksdk-0.27.0.tar.gz +/openstacksdk-0.36.0.tar.gz diff --git a/python-openstacksdk.spec b/python-openstacksdk.spec index 3095ff5..df05f3d 100644 --- a/python-openstacksdk.spec +++ b/python-openstacksdk.spec @@ -1,3 +1,15 @@ +# 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}} # Disable docs until bs4 package is available @@ -14,8 +26,8 @@ A collection of libraries for building applications to work with OpenStack \ clouds - test files Name: python-%{pypi_name} -Version: 0.27.0 -Release: 4%{?dist} +Version: 0.36.0 +Release: 2%{?dist} Summary: An SDK for building applications to work with OpenStack License: ASL 2.0 @@ -28,69 +40,85 @@ BuildRequires: git %description %{common_desc} -%package -n python3-%{pypi_name} +%package -n python%{pyver}-%{pypi_name} Summary: An SDK for building applications to work with OpenStack -%{?python_provide:%python_provide python3-%{pypi_name}} - -BuildRequires: python3-devel -BuildRequires: python3-pbr >= 2.0.0 -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-dogpile-cache -BuildRequires: python3-appdirs -BuildRequires: python3-requestsexceptions -BuildRequires: python3-munch -BuildRequires: python3-decorator -BuildRequires: python3-jmespath -BuildRequires: python3-netifaces -BuildRequires: python3-jsonschema -BuildRequires: python3-os-service-types +%{?python_provide:%python_provide python%{pyver}-%{pypi_name}} + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-pbr >= 2.0.0 +BuildRequires: python%{pyver}-keystoneauth1 +BuildRequires: python%{pyver}-appdirs +BuildRequires: python%{pyver}-requestsexceptions +BuildRequires: python%{pyver}-munch +BuildRequires: python%{pyver}-jmespath +BuildRequires: python%{pyver}-jsonschema +BuildRequires: python%{pyver}-os-service-types # Test requirements -BuildRequires: python3-iso8601 >= 0.1.11 -BuildRequires: python3-jsonpatch >= 1.16 -BuildRequires: python3-subunit -BuildRequires: python3-oslotest -BuildRequires: python3-stestr -BuildRequires: python3-mock -BuildRequires: python3-requests-mock -BuildRequires: python3-testrepository -BuildRequires: python3-testscenarios -BuildRequires: python3-testtools - -Requires: python3-cryptography >= 2.1 -Requires: python3-jsonpatch >= 1.16 -Requires: python3-keystoneauth1 >= 3.13.0 -Requires: python3-six -Requires: python3-pbr >= 2.0.0 -Requires: python3-PyYAML -Requires: python3-appdirs -Requires: python3-requestsexceptions >= 1.2.0 -Requires: python3-dogpile-cache -Requires: python3-munch -Requires: python3-decorator -Requires: python3-jmespath -Requires: python3-netifaces -Requires: python3-jsonschema -Requires: python3-iso8601 -Requires: python3-os-service-types >= 1.2.0 - -%description -n python3-%{pypi_name} +BuildRequires: python%{pyver}-iso8601 >= 0.1.11 +BuildRequires: python%{pyver}-jsonpatch >= 1.16 +BuildRequires: python%{pyver}-subunit +BuildRequires: python%{pyver}-oslotest +BuildRequires: python%{pyver}-oslo-config +BuildRequires: python%{pyver}-stestr +BuildRequires: python%{pyver}-mock +BuildRequires: python%{pyver}-testrepository +BuildRequires: python%{pyver}-testscenarios +BuildRequires: python%{pyver}-testtools +BuildRequires: python%{pyver}-requests-mock +BuildRequires: python%{pyver}-dogpile-cache +BuildRequires: python%{pyver}-ddt +# Handle python2 exception +%if %{pyver} == 2 +BuildRequires: python-decorator +BuildRequires: python-ipaddress +BuildRequires: python-netifaces +BuildRequires: python-futures +%else +BuildRequires: python%{pyver}-decorator +BuildRequires: python%{pyver}-netifaces +%endif + +Requires: python%{pyver}-cryptography >= 2.1 +Requires: python%{pyver}-jsonpatch >= 1.16 +Requires: python%{pyver}-keystoneauth1 >= 3.16.0 +Requires: python%{pyver}-six +Requires: python%{pyver}-pbr >= 2.0.0 +Requires: python%{pyver}-appdirs +Requires: python%{pyver}-requestsexceptions >= 1.2.0 +Requires: python%{pyver}-munch +Requires: python%{pyver}-jmespath +Requires: python%{pyver}-iso8601 +Requires: python%{pyver}-os-service-types >= 1.7.0 +Requires: python%{pyver}-dogpile-cache +# Handle python2 exception +%if %{pyver} == 2 +Requires: python-decorator +Requires: python-ipaddress +Requires: python-netifaces +Requires: python-futures +Requires: PyYAML +%else +Requires: python%{pyver}-decorator +Requires: python%{pyver}-netifaces +Requires: python%{pyver}-PyYAML +%endif + +%description -n python%{pyver}-%{pypi_name} %{common_desc} -%package -n python3-%{pypi_name}-tests +%package -n python%{pyver}-%{pypi_name}-tests Summary: An SDK for building applications to work with OpenStack - test files -Requires: python3-%{pypi_name} = %{version}-%{release} +Requires: python%{pyver}-%{pypi_name} = %{version}-%{release} -%description -n python3-%{pypi_name}-tests +%description -n python%{pyver}-%{pypi_name}-tests %{common_desc_tests} - - %if 0%{?with_doc} %package -n python-%{pypi_name}-doc Summary: An SDK for building applications to work with OpenStack - documentation -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-sphinx +BuildRequires: python%{pyver}-openstackdocstheme +BuildRequires: python%{pyver}-sphinx %description -n python-%{pypi_name}-doc A collection of libraries for building applications to work with OpenStack @@ -101,29 +129,40 @@ clouds - documentation. %autosetup -n %{pypi_name}-%{upstream_version} -S git # Let RPM handle the requirements rm -rf {,test-}requirements.txt +# This unit test requires python-prometheus, which is optional and not needed +rm -f openstack/tests/unit/test_stats.py %build - -%{py3_build} +%{pyver_build} %if 0%{?with_doc} -# generate html docs -sphinx-build-3 -b html doc/source html -# remove the sphinx-build-3 leftovers +# generate html docs +sphinx-build-%{pyver} -b html doc/source html +# remove the sphinx-build-%{pyver} leftovers rm -rf html/.{doctrees,buildinfo} %endif %install -%{py3_install} +%{pyver_install} %check export OS_STDOUT_CAPTURE=true export OS_STDERR_CAPTURE=true -export OS_TEST_TIMEOUT=10 +export OS_TEST_TIMEOUT=20 +# FIXME(jpena) we are skipping some unit tests due to +# https://storyboard.openstack.org/#!/story/2005677 +PYTHON=python%{pyver} stestr-%{pyver} --test-path ./openstack/tests/unit run --black-regex 'test_wait_for_task_' -export PYTHON=python3 -stestr-3 --test-path ./openstack/tests/unit run --black-regex "^.*test_list_multi_page_inferred_additional" +%files -n python%{pyver}-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/openstack-inventory +%{pyver_sitelib}/openstack +%{pyver_sitelib}/%{pypi_name}-*.egg-info +%exclude %{pyver_sitelib}/openstack/tests +%files -n python%{pyver}-%{pypi_name}-tests +%{pyver_sitelib}/openstack/tests %if 0%{?with_doc} %files -n python-%{pypi_name}-doc @@ -131,18 +170,10 @@ stestr-3 --test-path ./openstack/tests/unit run --black-regex "^.*test_list_mult %license LICENSE %endif -%files -n python3-%{pypi_name} -%doc README.rst -%license LICENSE -%{_bindir}/openstack-inventory -%{python3_sitelib}/openstack -%{python3_sitelib}/%{pypi_name}-*.egg-info -%exclude %{python3_sitelib}/openstack/tests - -%files -n python3-%{pypi_name}-tests -%{python3_sitelib}/openstack/tests - %changelog +* Fri Nov 08 2019 Alfredo Moralejo 0.36.0-2 +- Update to upstream version 0.36.0 + * Thu Oct 03 2019 Miro HronĨok - 0.27.0-4 - Rebuilt for Python 3.8.0rc1 (#1748018) diff --git a/sources b/sources index 5488829..ad6e753 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (openstacksdk-0.27.0.tar.gz) = 3eb2b26dfa37713967d533b66abb27ac107524bc48c5fa7d475fbcc58291e7531518226acdb1e0c20537a24fc6008e287545d61b40e3f1104c80a04df014d566 +SHA512 (openstacksdk-0.36.0.tar.gz) = e95cb7c626f8bdd0064ed69d767dc1d53742d9d7a0d6196058453113ddcab3bdd903a1ef7455a2f9fe4335733793c927a00fe333099ba142ef69945a287d3983