e639519
%{?python_enable_dependency_generator}
cc12d4d
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
e639519
%global sources_gpg_sign 0x01527a34f0d0080f8a5db8d6eb6c5df21b4b6363
df0cedb
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
d181f12
%global sname python-magnumclient
d181f12
%global pname magnumclient
916f8df
%global with_doc 1
d181f12
97f1d99
%global common_desc \
97f1d99
This is a client library for Magnum built on the Magnum API. \
97f1d99
It provides a Python API (the magnumclient module) and a \
97f1d99
command-line tool (magnum).
97f1d99
97f1d99
%global common_desc_tests Python-magnumclient test subpackage
97f1d99
d181f12
Name:           python-%{pname}
e639519
Version:        3.6.0
e639519
Release:        1%{?dist}
d181f12
Summary:        Client library for Magnum API
d181f12
d181f12
License:        ASL 2.0
d181f12
URL:            https://launchpad.net/python-magnumclient
97f1d99
Source0:        https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
cc12d4d
# Required for tarball sources verification
cc12d4d
%if 0%{?sources_gpg} == 1
cc12d4d
Source101:        https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz.asc
cc12d4d
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
cc12d4d
%endif
d181f12
BuildArch:      noarch
d181f12
cc12d4d
# Required for tarball sources verification
cc12d4d
%if 0%{?sources_gpg} == 1
cc12d4d
BuildRequires:  /usr/bin/gpgv2
cc12d4d
%endif
cc12d4d
d181f12
%description
97f1d99
%{common_desc}
d181f12
535ad64
%package -n     python3-%{pname}
d181f12
Summary:        Client library for Magnum API
535ad64
%{?python_provide:%python_provide python3-%{pname}}
916f8df
Obsoletes: python2-%{pname} < %{version}-%{release}
d181f12
535ad64
BuildRequires:  python3-devel
535ad64
BuildRequires:  python3-setuptools
535ad64
BuildRequires:  python3-pbr
8c11c33
BuildRequires:  git-core
d181f12
d181f12
# test dependencies
535ad64
BuildRequires:  python3-oslo-utils
535ad64
BuildRequires:  python3-openstackclient
535ad64
BuildRequires:  python3-oslo-serialization
535ad64
BuildRequires:  python3-oslo-log
535ad64
%if 0%{?rhel}
535ad64
BuildRequires:  python3-osprofiler
916f8df
%endif
535ad64
BuildRequires:  python3-stevedore
535ad64
BuildRequires:  python3-requests
535ad64
BuildRequires:  python3-oslo-i18n
535ad64
BuildRequires:  python3-fixtures
535ad64
BuildRequires:  python3-mock
535ad64
BuildRequires:  python3-testtools
535ad64
BuildRequires:  python3-keystoneauth1
535ad64
BuildRequires:  python3-prettytable
535ad64
BuildRequires:  python3-stestr
535ad64
535ad64
Requires:    python3-babel
535ad64
Requires:    python3-cryptography
535ad64
Requires:    python3-keystoneauth1 >= 3.4.0
535ad64
Requires:    python3-oslo-i18n >= 3.15.3
535ad64
Requires:    python3-oslo-log >= 3.36.0
535ad64
Requires:    python3-oslo-serialization >= 2.18.0
535ad64
Requires:    python3-oslo-utils >= 3.33.0
535ad64
Requires:    python3-osc-lib >= 1.8.0
535ad64
Requires:    python3-os-client-config >= 1.28.0
535ad64
Requires:    python3-pbr
535ad64
Requires:    python3-prettytable
535ad64
535ad64
Requires:    python3-decorator
535ad64
535ad64
%description -n python3-%{pname}
97f1d99
%{common_desc}
d181f12
916f8df
%if 0%{?with_doc}
d181f12
%package -n python-%{pname}-doc
d181f12
Summary:        python-magnumclient documentation
535ad64
BuildRequires:   python3-sphinx
535ad64
BuildRequires:   python3-openstackdocstheme
535ad64
BuildRequires:   python3-os-client-config
916f8df
535ad64
BuildRequires:   python3-decorator
d181f12
d181f12
%description -n python-%{pname}-doc
d181f12
Documentation for python-magnumclient
916f8df
%endif
d181f12
535ad64
%package -n python3-%{pname}-tests
d181f12
Summary: Python-magnumclient test subpackage
916f8df
%{?python_provide:%python_provide python2-%{pname}-tests}
916f8df
535ad64
Requires:  python3-%{pname} = %{version}-%{release}
535ad64
Requires:  python3-oslo-utils
535ad64
Requires:  python3-stevedore
535ad64
Requires:  python3-requests
535ad64
Requires:  python3-oslo-i18n
535ad64
Requires:  python3-fixtures
535ad64
Requires:  python3-mock
535ad64
Requires:  python3-testtools
535ad64
Requires:  python3-keystoneauth1
535ad64
Requires:  python3-prettytable
535ad64
Requires:  python3-stestr
535ad64
535ad64
%description -n python3-%{pname}-tests
97f1d99
%{common_desc_tests}
d181f12
d181f12
%prep
cc12d4d
# Required for tarball sources verification
cc12d4d
%if 0%{?sources_gpg} == 1
cc12d4d
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
cc12d4d
%endif
97f1d99
%autosetup -n %{name}-%{upstream_version} -S git
d181f12
d181f12
# let RPM handle deps
916f8df
rm -rf *requirements.txt
d181f12
d181f12
%build
535ad64
%{py3_build}
916f8df
916f8df
%if 0%{?with_doc}
d181f12
# generate html docs
916f8df
# (TODO) Re-add -W once https://review.openstack.org/#/c/554197 is in a
916f8df
# tagged release
535ad64
sphinx-build-3 -b html doc/source doc/build/html
97f1d99
# Fix hidden-file-or-dir warnings
97f1d99
rm -rf doc/build/html/.{doctrees,buildinfo}
916f8df
%endif
d181f12
d181f12
%install
535ad64
%{py3_install}
d181f12
d181f12
%check
535ad64
%if 0%{?rhel}
535ad64
PYTHON=%{__python3} stestr run --slowest
535ad64
%else
535ad64
PYTHON=%{__python3} stestr run --slowest || true
535ad64
%endif
d181f12
535ad64
%files -n python3-%{pname}
d181f12
%doc README.rst
d181f12
%license LICENSE
535ad64
%{python3_sitelib}/%{pname}
d181f12
%{_bindir}/magnum
535ad64
%{python3_sitelib}/*.egg-info
535ad64
%exclude %{python3_sitelib}/%{pname}/tests
d181f12
916f8df
%if 0%{?with_doc}
d181f12
%files -n python-%{pname}-doc
d181f12
%license LICENSE
97f1d99
%doc doc/build/html
916f8df
%endif
d181f12
535ad64
%files -n python3-%{pname}-tests
535ad64
%{python3_sitelib}/%{pname}/tests
d181f12
d181f12
%changelog
e639519
* Thu May 19 2022 Joel Capitao <jcapitao@redhat.com> 3.6.0-1
e639519
- Update to upstream version 3.6.0
e639519
19cb18f
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-4
19cb18f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
19cb18f
ee05400
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-3
ee05400
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
ee05400
cfc4d87
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.4.0-2
cfc4d87
- Rebuilt for Python 3.10
cfc4d87
8c11c33
* Mon Mar 22 2021 Joel Capitao <jcapitao@redhat.com> 3.4.0-1
8c11c33
- Update to upstream version 3.4.0
8c11c33
a584123
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
a584123
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a584123
cc12d4d
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 3.2.1-2
cc12d4d
- Update to upstream version 3.2.1
cc12d4d
dc24d01
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
dc24d01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
dc24d01
535ad64
* Tue Jun 09 2020 Joel Capitao <jcapitao@redhat.com> 3.0.0-1
535ad64
- Update to upstream version 3.0.0
535ad64
2e1470f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.15.0-3
2e1470f
- Rebuilt for Python 3.9
2e1470f
e3b033f
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.0-2
e3b033f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e3b033f
b5ec27e
* Thu Nov 07 2019 Alfredo Moralejo <amoralej@redhat.com> 2.15.0-1
b5ec27e
- Update to upstream version 2.15.0
b5ec27e
f1a876e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.12.0-5
f1a876e
- Rebuilt for Python 3.8.0rc1 (#1748018)
f1a876e
12719e5
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.12.0-4
12719e5
- Rebuilt for Python 3.8
12719e5
e4b658c
* Mon Jul 29 2019 Alfredo Moralejo <amoralej@redhat.com> - 2.12.0-3
e4b658c
- Removed osprofiler as BR.
e4b658c
f9e19e9
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-2
f9e19e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f9e19e9
916f8df
* Mon Mar 11 2019 RDO <dev@lists.rdoproject.org> 2.12.0-1
916f8df
- Update to 2.12.0
e1737cf