%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} } %global sources_gpg_sign 0x5d2d1e4fb8d38e6af76c50d53d4fec30cf5ce3da %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global sname python-magnumclient %global pname magnumclient %global with_doc 1 %global common_desc \ This is a client library for Magnum built on the Magnum API. \ It provides a Python API (the magnumclient module) and a \ command-line tool (magnum). %global common_desc_tests Python-magnumclient test subpackage Name: python-%{pname} Version: 3.4.0 Release: 3%{?dist} Summary: Client library for Magnum API License: ASL 2.0 URL: https://launchpad.net/python-magnumclient Source0: https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz # Required for tarball sources verification %if 0%{?sources_gpg} == 1 Source101: https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz.asc Source102: https://releases.openstack.org/_static/%{sources_gpg_sign}.txt %endif BuildArch: noarch BuildRequires: python3-devel BuildRequires: git-core # Required for tarball sources verification %if 0%{?sources_gpg} == 1 BuildRequires: /usr/bin/gpgv2 %endif %description %{common_desc} %package -n python3-%{pname} Summary: Client library for Magnum API %{?python_provide:%python_provide python3-%{pname}} Obsoletes: python2-%{pname} < %{version}-%{release} %description -n python3-%{pname} %{common_desc} %if 0%{?with_doc} %package -n python-%{pname}-doc Summary: python-magnumclient documentation %description -n python-%{pname}-doc Documentation for python-magnumclient %endif %package -n python3-%{pname}-tests Summary: Python-magnumclient test subpackage %{?python_provide:%python_provide python2-%{pname}-tests} Requires: python3-%{pname} = %{version}-%{release} %description -n python3-%{pname}-tests %{common_desc_tests} %prep # Required for tarball sources verification %if 0%{?sources_gpg} == 1 %{gpgverify} --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0} %endif %autosetup -n %{name}-%{upstream_version} -S git # ValueError: Requirement '-chttps://releases.openstack.org/constraints/upper/master' from tox --print-deps-only: py310 is invalid. Hint: It might# be an URL sed -i '/upper/d' tox.ini # No matching package to install: 'python3dist(osprofiler) >= 1.4' sed -i '/osprofiler/d' test-requirements.txt # nothing provides requested (python3dist(hacking) < 3.1 with python3dist(hacking) >= 3.0.1) sed -i '/hacking/d' test-requirements.txt sed -i '/bandit/d' test-requirements.txt %generate_buildrequires # The build/test/runtime BuildRequires are generated from upstream metadata # venv tox env list doc/requirements.txt %pyproject_buildrequires -t -e venv,docs %build %pyproject_wheel %if 0%{?with_doc} # generate html docs # (TODO) Re-add -W once https://review.openstack.org/#/c/554197 is in a # tagged release sphinx-build-3 -b html doc/source doc/build/html # Fix hidden-file-or-dir warnings rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files %{pname} %check %if 0%{?rhel} %tox %else %tox || true %endif %files -n python3-%{pname} -f %{pyproject_files} %doc README.rst %license LICENSE %{_bindir}/magnum %{python3_sitelib}/*.dist-info %exclude %{python3_sitelib}/%{pname}/tests %if 0%{?with_doc} %files -n python-%{pname}-doc %license LICENSE %doc doc/build/html %endif %files -n python3-%{pname}-tests %{python3_sitelib}/%{pname}/tests %changelog * Fri Jul 23 2021 Fedora Release Engineering - 3.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 3.4.0-2 - Rebuilt for Python 3.10 * Mon Mar 22 2021 Joel Capitao 3.4.0-1 - Update to upstream version 3.4.0 * Wed Jan 27 2021 Fedora Release Engineering - 3.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Oct 28 2020 Alfredo Moralejo 3.2.1-2 - Update to upstream version 3.2.1 * Wed Jul 29 2020 Fedora Release Engineering - 3.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 09 2020 Joel Capitao 3.0.0-1 - Update to upstream version 3.0.0 * Tue May 26 2020 Miro Hrončok - 2.15.0-3 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 2.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Nov 07 2019 Alfredo Moralejo 2.15.0-1 - Update to upstream version 2.15.0 * Thu Oct 03 2019 Miro Hrončok - 2.12.0-5 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 2.12.0-4 - Rebuilt for Python 3.8 * Mon Jul 29 2019 Alfredo Moralejo - 2.12.0-3 - Removed osprofiler as BR. * Fri Jul 26 2019 Fedora Release Engineering - 2.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Mar 11 2019 RDO 2.12.0-1 - Update to 2.12.0