From 60c23e69d7fddac76b9ce3bf59147ccec430850f Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Oct 26 2023 09:52:13 +0000 Subject: Sync from RDO bobcat release from python-mistralclient-5.1.0-1.el9s --- diff --git a/.gitignore b/.gitignore index 16dd3f3..67af1cf 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ /python-mistralclient-5.0.0.tar.gz /0xa7475c5f2122fec3f90343223fe3bf5aad1080e4.txt /python-mistralclient-5.0.0.tar.gz.asc +/python-mistralclient-5.1.0.tar.gz +/0x815afec729392386480e076dcc0dfe2d21c023c9.txt +/python-mistralclient-5.1.0.tar.gz.asc diff --git a/python-mistralclient.spec b/python-mistralclient.spec index 402218d..bca23b5 100644 --- a/python-mistralclient.spec +++ b/python-mistralclient.spec @@ -1,22 +1,28 @@ %{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} } -%global sources_gpg_sign 0xa7475c5f2122fec3f90343223fe3bf5aad1080e4 +%global sources_gpg_sign 0x815afec729392386480e076dcc0dfe2d21c023c9 %global pypi_name mistralclient %global cliname mistral %global with_doc 1 %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +# we are excluding some BRs from automatic generator +%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order tempest osprofiler +# Exclude sphinx from BRs if docs are disabled +%if ! 0%{?with_doc} +%global excluded_brs %{excluded_brs} sphinx openstackdocstheme +%endif %global common_desc \ Python client for Mistral REST API. Includes python library for Mistral API \ and Command Line Interface (CLI) library. Name: python-%{pypi_name} -Version: 5.0.0 -Release: 3%{?dist} +Version: 5.1.0 +Release: 1%{?dist} Summary: Python client for Mistral REST API -License: ASL 2.0 +License: Apache-2.0 URL: https://pypi.io/pypi/python-mistralclient Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz # Required for tarball sources verification @@ -37,26 +43,11 @@ BuildRequires: /usr/bin/gpgv2 %package -n python3-%{pypi_name} Summary: Python client for Mistral REST API -%{?python_provide:%python_provide python3-%{pypi_name}} -Obsoletes: python2-%{pypi_name} < %{version}-%{release} BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr +BuildRequires: pyproject-rpm-macros BuildRequires: git-core -Requires: python3-osc-lib >= 1.10.0 -Requires: python3-oslo-i18n >= 3.15.3 -Requires: python3-oslo-utils >= 3.33.0 -Requires: python3-oslo-serialization >= 2.18.0 -Requires: python3-pbr -Requires: python3-requests >= 2.14.2 -Requires: python3-stevedore >= 1.20.0 -Requires: python3-keystoneauth1 >= 3.4.0 -Requires: python3-cliff >= 2.8.0 - -Requires: python3-yaml >= 3.13 - %description -n python3-%{pypi_name} %{common_desc} @@ -66,19 +57,6 @@ Requires: python3-yaml >= 3.13 %package -n python-%{pypi_name}-doc Summary: Documentation for python client for Mistral REST API -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-sphinxcontrib-apidoc -BuildRequires: python3-oslotest -BuildRequires: python3-stevedore -BuildRequires: python3-oslo-utils -BuildRequires: python3-oslo-i18n -BuildRequires: python3-osc-lib -BuildRequires: python3-cliff - -BuildRequires: python3-PyYAML -BuildRequires: python3-requests-mock - %description -n python-%{pypi_name}-doc %{common_desc} @@ -92,25 +70,43 @@ This package contains documentation. %{gpgverify} --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0} %endif %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 # Remove the functional tests, we don't need them in the package rm -rf mistralclient/tests/functional +sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini +sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini +sed -i /^minversion.*/d tox.ini +sed -i /^requires.*virtualenv.*/d tox.ini + +# Exclude some bad-known BRs +for pkg in %{excluded_brs}; do + for reqfile in doc/requirements.txt test-requirements.txt; do + if [ -f $reqfile ]; then + sed -i /^${pkg}.*/d $reqfile + fi + done +done + +# Automatic BR generation +%generate_buildrequires +%if 0%{?with_doc} + %pyproject_buildrequires -t -e %{default_toxenv},docs +%else + %pyproject_buildrequires -t -e %{default_toxenv} +%endif + %build -%{py3_build} +%pyproject_wheel %if 0%{with_doc} # generate html docs -sphinx-build-3 -b html doc/source doc/build/html +%tox -e docs # remove the sphinx-build-3 leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install -%{py3_install} +%pyproject_install # Create a versioned binary for backwards compatibility until everything is pure py3 ln -s %{cliname} %{buildroot}%{_bindir}/%{cliname}-3 @@ -124,7 +120,7 @@ install -m 644 -T tools/mistral.bash_completion %{buildroot}%{_sysconfdir}/bash_ %license LICENSE %doc README.rst %{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/python_%{pypi_name}-*-py%{python3_version}.egg-info +%{python3_sitelib}/python_%{pypi_name}-*.dist-info %{_bindir}/%{cliname} %{_bindir}/%{cliname}-3 %{_sysconfdir}/bash_completion.d/python-mistralclient @@ -138,6 +134,9 @@ install -m 644 -T tools/mistral.bash_completion %{buildroot}%{_sysconfdir}/bash_ %changelog +* Thu Oct 26 2023 Alfredo Moralejo 5.1.0-1 +- Update to upstream version 5.1.0 + * Fri Jul 21 2023 Fedora Release Engineering - 5.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 4f0608f..4bae040 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (python-mistralclient-5.0.0.tar.gz) = 6ef414b5bbc14bfa84eb7a22985e21c6f60693bfaa8e284ca8e814b65e3fd8c3dd2398efb4b3923a07916a598e12657bbeb50c39d874a6052caafa8e68195988 -SHA512 (0xa7475c5f2122fec3f90343223fe3bf5aad1080e4.txt) = cc8731a0fbdf791e51887609d13ee0ba402528572ab075419be998e29510211a6423fdfabc694eef8b654403d43cdcfc6b06ee244df58c5c4abc3e77ce85da24 -SHA512 (python-mistralclient-5.0.0.tar.gz.asc) = fbd2745d88eacd14614bcfeb539ad93e0747fea10ab3c52fe3cf6feb444c6f2339425f8009009e810cab16e609a53e61e6b1f9954c8fc88f0fdd6b331f917a8b +SHA512 (python-mistralclient-5.1.0.tar.gz) = 3b3d8ac531d803d4efe921904bf21f10d43b641bfc4ec07d657563792a674ead1ef5ffe43389bf3548d593a2be6f26279f508a992077216905e3d5af70ff03e3 +SHA512 (0x815afec729392386480e076dcc0dfe2d21c023c9.txt) = be660eacaae93572475d0ae4e9cc29fc90897ec8a2ca8f4d0c5c7dcf682de9933e71a811f82b067fe5cb92de90165099ad7b49be98a6082c733a7f6b5b5f5a77 +SHA512 (python-mistralclient-5.1.0.tar.gz.asc) = 0cfb5655b8a45b378ecaab3720351e17e39a1a6a3d14894f401ebee1093f1fd9bf95f6cb5ce17a600ac3117de7224393b8f27aa0c6cd89456c61ae5bc745753a