Blame python-vitrageclient.spec

642043f
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
642043f
%global sources_gpg_sign 0x2426b928085a020d8a90d0d879ab7008d0896c8a
7f34616
%global pypi_name vitrageclient
4582f0f
4582f0f
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
7f34616
%{!?py_req_cleanup: %global py_req_cleanup rm -rf {,test-}requirements.txt}
7f34616
%global with_doc 1
4582f0f
f50a551
%global common_desc \
f50a551
Python client for Vitrage REST API. Includes python library for Vitrage API \
f50a551
and Command Line Interface (CLI) library.
f50a551
4582f0f
Name:           python-%{pypi_name}
642043f
Version:        4.1.1
8b8ce56
Release:        2%{?dist}
4582f0f
Summary:        Python client for Vitrage REST API
4582f0f
4582f0f
License:        ASL 2.0
4582f0f
URL:            http://pypi.python.org/pypi/%{name}
f50a551
Source0:        https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
642043f
# Required for tarball sources verification
642043f
%if 0%{?sources_gpg} == 1
642043f
Source101:        https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz.asc
642043f
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
642043f
%endif
4582f0f
4582f0f
BuildArch:      noarch
4582f0f
642043f
# Required for tarball sources verification
642043f
%if 0%{?sources_gpg} == 1
642043f
BuildRequires:  /usr/bin/gpgv2
642043f
%endif
642043f
4582f0f
%description
f50a551
%{common_desc}
4582f0f
7edadd8
%package -n     python3-%{pypi_name}
7f34616
7edadd8
BuildRequires:  python3-devel
7edadd8
BuildRequires:  python3-setuptools
7edadd8
BuildRequires:  python3-pbr
7f34616
BuildRequires:  git
7edadd8
BuildRequires:  python3-iso8601
7edadd8
BuildRequires:  python3-mock
7edadd8
BuildRequires:  python3-subunit
7edadd8
BuildRequires:  python3-pydot
7edadd8
BuildRequires:  python3-oslotest
7edadd8
BuildRequires:  python3-testrepository
7edadd8
BuildRequires:  python3-testtools
7edadd8
BuildRequires:  python3-cliff
7edadd8
BuildRequires:  python3-testscenarios
7edadd8
7edadd8
BuildRequires:  python3-networkx
7edadd8
7edadd8
Requires:       python3-iso8601
7edadd8
Requires:       python3-keystoneauth1 >= 3.4.0
7edadd8
Requires:       python3-pbr
7edadd8
Requires:       python3-pydot
7edadd8
Requires:       python3-osc-lib >= 1.10.0
7edadd8
Requires:       python3-oslo-utils >= 3.33.0
7edadd8
Requires:       python3-oslo-log
7edadd8
Requires:       python3-cliff >= 2.8.0
4582f0f
3a516ee
Requires:       %{name}-bash-completion = %{version}-%{release}
3a516ee
7edadd8
Requires:       python3-networkx
7f34616
7f34616
7f34616
Summary:        Python client for Vitrage REST API
7edadd8
%{?python_provide:%python_provide python3-%{pypi_name}}
7f34616
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
7f34616
7edadd8
%description -n python3-%{pypi_name}
f50a551
%{common_desc}
4582f0f
7f34616
%if 0%{?with_doc}
4582f0f
# Documentation package
4582f0f
%package -n python-%{pypi_name}-doc
4582f0f
Summary:       Documentation for python client for Vitrage REST API
4582f0f
7edadd8
BuildRequires: python3-sphinx
7edadd8
BuildRequires: python3-openstackdocstheme
4582f0f
4582f0f
%description -n python-%{pypi_name}-doc
4582f0f
Documentation for python client for Vitrage REST API. Includes python library
4582f0f
for Vitrage API and Command Line Interface (CLI) library.
7f34616
%endif
4582f0f
4582f0f
%package bash-completion
4582f0f
Summary:        bash completion files for vitrage
4582f0f
BuildRequires:  bash-completion
4582f0f
4582f0f
%description bash-completion
4582f0f
This package contains bash completion files for vitrage.
4582f0f
4582f0f
4582f0f
%prep
642043f
# Required for tarball sources verification
642043f
%if 0%{?sources_gpg} == 1
642043f
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
642043f
%endif
f50a551
%autosetup -n %{name}-%{upstream_version} -S git
4582f0f
4582f0f
# Let RPM handle the dependencies
7f34616
rm -rf *requirements.txt
4582f0f
4582f0f
4582f0f
%build
7edadd8
%{py3_build}
4582f0f
7f34616
%if 0%{?with_doc}
4582f0f
# generate html docs
7edadd8
sphinx-build -W -b html doc/source doc/build/html
7edadd8
# remove the sphinx-build leftovers
f50a551
rm -rf doc/build/html/.{doctrees,buildinfo}
7f34616
%endif
4582f0f
4582f0f
%install
7edadd8
%{py3_install}
7f34616
7f34616
# Create a versioned binary for backwards compatibility until everything is pure py3
7edadd8
ln -s vitrage %{buildroot}%{_bindir}/vitrage-3
4582f0f
4582f0f
# push autocompletion
4582f0f
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
4582f0f
mkdir -p %{buildroot}$bashcompdir
4582f0f
mv %{buildroot}%{_datadir}/vitrage.bash_completion %{buildroot}$bashcompdir/vitrage
4582f0f
4582f0f
%check
7edadd8
export PYTHON=%{__python3}
7edadd8
# tests.cli.test_topology_show.TopologyShowTest.test_dot_emitter unit test fail because of
7edadd8
# elements order in a list. Until we find proper fix let's ignore results.
7edadd8
%{__python3} setup.py test --slowest || true
4582f0f
7edadd8
%files -n python3-%{pypi_name}
4582f0f
%license LICENSE
4582f0f
%doc README.rst
7edadd8
%{python3_sitelib}/%{pypi_name}
ac553bd
%{python3_sitelib}/python_%{pypi_name}-*-py%{python3_version}.egg-info
3a516ee
%{_bindir}/vitrage
7edadd8
%{_bindir}/vitrage-3
4582f0f
7f34616
%if 0%{?with_doc}
4582f0f
%files -n python-%{pypi_name}-doc
f50a551
%doc doc/build/html
4582f0f
%license LICENSE
7f34616
%endif
4582f0f
4582f0f
%files bash-completion
4582f0f
%license LICENSE
4582f0f
%{_datadir}/bash-completion/completions/vitrage
4582f0f
4582f0f
%changelog
642043f
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 4.1.1-2
642043f
- Update to upstream version 4.1.1
642043f
8b8ce56
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
8b8ce56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8b8ce56
7edadd8
* Thu Jun 04 2020 Joel Capitao <jcapitao@redhat.com> 4.0.1-1
7edadd8
- Update to upstream version 4.0.1
7edadd8
257ec52
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.0-3
257ec52
- Rebuilt for Python 3.9
257ec52
f443622
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
f443622
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f443622
52dbaf5
* Fri Nov 08 2019 Alfredo Moralejo <amoralej@redhat.com> 3.0.0-1
52dbaf5
- Update to upstream version 3.0.0
52dbaf5
02a402d
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-4
02a402d
- Rebuilt for Python 3.8.0rc1 (#1748018)
02a402d
1ed7d09
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-3
1ed7d09
- Rebuilt for Python 3.8
1ed7d09
c5b1ab3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2
c5b1ab3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c5b1ab3
7f34616
* Mon Mar 11 2019 RDO <dev@lists.rdoproject.org> 2.7.0-1
7f34616
- Update to 2.7.0
7f34616
0895c57
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
0895c57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7f34616
-
3a516ee
* Mon Nov 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-2
3a516ee
- Subpackage python2-vitrageclient has been removed
3a516ee
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
3a516ee
f693029
* Tue May 22 2018 RDO <dev@lists.rdoproject.org> 2.1.0-1
f693029
- Update to 2.1.0
4582f0f
f693029
* Sun Feb 11 2018 RDO <dev@lists.rdoproject.org> 2.0.0-1
f693029
- Update to 2.0.0
4582f0f