diff --git a/os-client-config-1.31.2.tar.gz b/os-client-config-1.31.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..8b48e9490a05d243ae72b5c6fe75953cf268f0de Binary files /dev/null and b/os-client-config-1.31.2.tar.gz differ diff --git a/os-client-config-2.1.0.tar.gz b/os-client-config-2.1.0.tar.gz deleted file mode 100644 index 17bf04b5a5231a50be52b776c6978ff31e28cf38..0000000000000000000000000000000000000000 Binary files a/os-client-config-2.1.0.tar.gz and /dev/null differ diff --git a/python-os-client-config.spec b/python-os-client-config.spec index bea0c3af246b28b9d558d750a20c18972ee59832..72f36e3957abe55c5eda57c8b82871f853886dad 100644 --- a/python-os-client-config.spec +++ b/python-os-client-config.spec @@ -1,97 +1,162 @@ -%global _empty_manifest_terminate_build 0 -%global with_doc 1 +%{!?_licensedir:%global license %%doc} +%global pypi_name os-client-config +%global with_python3 0 -Name: python-os-client-config -Version: 2.1.0 -Release: 1%{?dist} -Summary: OpenStack Client Configuration Library -License: Apache-2.0 -URL: https://github.com/openstack/os-client-config -Source0: https://pypi.io/packages/source/o/os-client-config/os-client-config-2.1.0.tar.gz -BuildArch: noarch -BuildRequires: git +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} -%description +%global common_desc \ The os-client-config is a library for collecting client configuration for \ using an OpenStack cloud in a consistent and comprehensive manner. It \ will find cloud config for as few as 1 cloud and as many as you want to \ put in a config file. It will read environment variables and config files, \ and it also contains some vendor specific default values so that you don't \ -have to know extra info to use OpenStack +have to know extra info to use OpenStack \ + \ +* If you have a config file, you will get the clouds listed in it \ +* If you have environment variables, you will get a cloud named `envvars` \ +* If you have neither, you will get a cloud named `defaults` with base defaults + +Name: python-%{pypi_name} +Version: 1.31.2 +Release: 1 +Summary: OpenStack Client Configuration Library +License: Apache-2.0 +URL: https://github.com/openstack/%{pypi_name} +Source0: https://pypi.io/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{pypi_name}} +Obsoletes: python-%{pypi_name} < 1.7.3 +# compat for previous Delorean Trunk package +Provides: os-client-config +BuildRequires: git +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr + +# Testing requirements +BuildRequires: python2-fixtures +BuildRequires: python2-os-testr +BuildRequires: python2-glanceclient >= 0.18.0 +BuildRequires: python2-openstacksdk +BuildRequires: python2-oslotest >= 1.10.0 + +# Requirements +BuildRequires: python2-jsonschema >= 2.6.0 +Requires: python2-openstacksdk >= 0.13.0 + +%description -n python2-%{pypi_name} +%{common_desc} + +%package -n python2-%{pypi_name}-doc +Summary: Documentation for OpenStack os-client-config library +%{?python_provide:%python_provide python2-%{pypi_name}-doc} -%package -n python3-os-client-config -Summary: Library for collecting client configuration of OpenStack -%{?python_provide:%python_provide python3-os-client-config} +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-reno +%description -n python2-%{pypi_name}-doc +Documentation for the os-client-config library. + + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr -BuildRequires: python3-pip + +# Testing requirements BuildRequires: python3-fixtures -BuildRequires: python3-stestr -BuildRequires: python3-glanceclient >= 0.18.0 +BuildRequires: python3-os-testr +BuildRequires: python3-glanceclient BuildRequires: python3-openstacksdk -BuildRequires: python3-oslotest >= 1.10.0 BuildRequires: python3-jsonschema >= 2.6.0 -Requires: python3-openstacksdk >= 0.13.0 - +BuildRequires: python3-oslotest >= 1.10.0 -%description -n python3-os-client-config -The os-client-config is a library for collecting client configuration for \ -using an OpenStack cloud in a consistent and comprehensive manner. It \ -will find cloud config for as few as 1 cloud and as many as you want to \ -put in a config file. It will read environment variables and config files, \ -and it also contains some vendor specific default values so that you don't \ -have to know extra info to use OpenStack +Requires: python3-openstacksdk >= 0.13.0 +%description -n python3-%{pypi_name} +%{common_desc} -%if 0%{?with_doc} -%package -n python-os-client-config-doc -Summary: Documentation for OpenStack os-client-config library +%package -n python3-%{pypi_name}-doc +Summary: Documentation for OpenStack os-client-config library +%{?python_provide:%python_provide python3-%{pypi_name}-doc} +Obsoletes: python-%{pypi_name}-doc < 1.7.3 -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-reno +BuildRequires: python3-sphinx +BuildRequires: python3-oslo-sphinx -%description -n python-os-client-config-doc +%description -n python3-%{pypi_name}-doc Documentation for the os-client-config library. %endif %prep -%autosetup -n os-client-config-2.1.0 -S git +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +# Let RPM handle the dependencies rm -f test-requirements.txt requirements.txt %build -%{py3_build} - -%if 0%{?with_doc} -sphinx-build-3 -b html doc/source/ doc/build/html -rm -rf doc/build/html/.{doctrees,buildinfo} doc/build/html/objects.inv +%py2_build +%if 0%{?with_python3} +%py3_build %endif %install -%{py3_install} +%py2_install + +# generate html doc +%{__python2} setup.py build_sphinx -b html +rm -rf doc/build/html/.{doctrees,buildinfo} doc/build/html/objects.inv + +%if 0%{?with_python3} +%py3_install +%endif %check export OS_TEST_PATH='./os_client_config/tests' export PATH=$PATH:$RPM_BUILD_ROOT/usr/bin export PYTHONPATH=$PWD +stestr --test-path $OS_TEST_PATH run +%if 0%{?with_python3} +rm -rf .stestr +stestr-3 --test-path $OS_TEST_PATH run +%endif + +%files -n python2-%{pypi_name} +%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst +%license LICENSE +%{python2_sitelib}/os_client_config +%{python2_sitelib}/*.egg-info + +%files -n python2-%{pypi_name}-doc +%license LICENSE +%doc doc/build/html -%files -n python3-os-client-config +%if 0%{?with_python3} +%files -n python3-%{pypi_name} %doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst %license LICENSE %{python3_sitelib}/os_client_config %{python3_sitelib}/*.egg-info -%if 0%{?with_doc} -%files -n python-os-client-config-doc +%files -n python3-%{pypi_name}-doc %license LICENSE %doc doc/build/html %endif %changelog -* Thu Jan 13 2021 Python_Bot +* Mon May 10 2021 Python_Bot - Package Spec generated