Blame python-designateclient.spec

f7411d7
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
f7411d7
%global common_desc Client library and command line utility for interacting with Openstack Designate API
f7411d7
e917630
%global sname designateclient
e917630
e917630
%if 0%{?fedora}
e917630
%global with_python3 1
e917630
%endif
e917630
e917630
Name:       python-%{sname}
f7411d7
Version:    2.0.0
5ac4cde
Release:    2%{?dist}
f7411d7
Summary:    Python API and CLI for OpenStack Designate
f7411d7
f7411d7
License:    ASL 2.0
e917630
URL:        https://launchpad.net/python-%{sname}/
e917630
Source0:    https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
f7411d7
f7411d7
BuildArch:  noarch
f7411d7
e917630
%description
e917630
Client library and command line utility for interacting with Openstack Designate API
e917630
e917630
%package -n python2-%{sname}
e917630
Summary:    Python API and CLI for OpenStack Designate
e917630
%{?python_provide:%python_provide python2-%{sname}}
e917630
f7411d7
BuildRequires: python2-devel
f7411d7
BuildRequires: python-setuptools
f7411d7
BuildRequires: python-pbr
f7411d7
f7411d7
Requires: python-cliff
f7411d7
Requires: python-jsonschema >= 2.0.0
f7411d7
Requires: python-pbr
e917630
Requires: python-keystoneauth1
f7411d7
Requires: python-requests >= 2.2.0
f7411d7
Requires: python-six >= 1.9.0
f7411d7
Requires: python-stevedore
e917630
Requires: python-debtcollector
e917630
Requires: python-oslo-utils
Alan Pevec 8134226
e917630
%description -n python2-%{sname}
f7411d7
%{common_desc}
f7411d7
f7411d7
e917630
%package -n python2-%{sname}-tests
e917630
Summary:    Python API and CLI for OpenStack Designate (tests)
e917630
%{?python_provide:%python_provide python2-%{sname}-tests}
f7411d7
Requires:	%{name} = %{version}-%{release}
f7411d7
e917630
%description -n python2-%{sname}-tests
e917630
%{common_desc}
e917630
e917630
This package contains Designate client tests files.
f7411d7
e917630
e917630
%if 0%{?with_python3}
e917630
%package -n python3-%{sname}
e917630
Summary:    Python API and CLI for OpenStack Designate
e917630
%{?python_provide:%python_provide python3-%{sname}}
e917630
e917630
BuildRequires: python3-devel
e917630
BuildRequires: python3-setuptools
e917630
BuildRequires: python3-pbr
e917630
e917630
Requires: python3-cliff
e917630
Requires: python3-jsonschema >= 2.0.0
e917630
Requires: python3-pbr
e917630
Requires: python3-keystoneauth1
e917630
Requires: python3-requests >= 2.2.0
e917630
Requires: python3-six >= 1.9.0
e917630
Requires: python3-stevedore
e917630
Requires: python3-debtcollector
e917630
Requires: python3-oslo-utils
e917630
e917630
%description -n python3-%{sname}
f7411d7
%{common_desc}
f7411d7
f7411d7
e917630
%package -n python3-%{sname}-tests
e917630
Summary:    Python API and CLI for OpenStack Designate (tests)
e917630
%{?python_provide:%python_provide python3-%{sname}-tests}
e917630
Requires:	%{name} = %{version}-%{release}
e917630
e917630
%description -n python3-%{sname}-tests
e917630
%{common_desc}
e917630
e917630
This package contains Designate client tests files.
e917630
%endif
e917630
e917630
e917630
%package doc
e917630
Summary:          Documentation for OpenStack Designate API Client
e917630
e917630
BuildRequires:    python-sphinx
e917630
BuildRequires:    python-oslo-sphinx
e917630
e917630
%description      doc
e917630
%{common_desc}
e917630
e917630
This package contains auto-generated documentation.
Victoria Martínez de la Cruz 6969687
Victoria Martínez de la Cruz 6969687
%prep
f7411d7
%setup -q -n %{name}-%{upstream_version}
f7411d7
e917630
rm -rf {,test-}requirements.txt
Victoria Martínez de la Cruz 6969687
Victoria Martínez de la Cruz 6969687
%build
e917630
%py2_build
e917630
%if 0%{?with_python3}
e917630
%py3_build
e917630
%endif
Victoria Martínez de la Cruz 6969687
e917630
%install
e917630
%if 0%{?with_python3}
e917630
%py3_install
e917630
mv %{buildroot}%{_bindir}/designate %{buildroot}%{_bindir}/designate-%{python3_version}
e917630
ln -s ./designate-%{python3_version} %{buildroot}%{_bindir}/designate-3
e917630
%endif
f7411d7
e917630
%py2_install
e917630
mv %{buildroot}%{_bindir}/designate %{buildroot}%{_bindir}/designate-%{python2_version}
e917630
ln -s ./designate-%{python2_version} %{buildroot}%{_bindir}/designate-2
f7411d7
e917630
ln -s ./designate-2 %{buildroot}%{_bindir}/designate
f7411d7
f7411d7
e917630
export PYTHONPATH="$( pwd ):$PYTHONPATH"
e917630
sphinx-build -b html doc/source html
Victoria Martínez de la Cruz 6969687
e917630
%files -n python2-%{sname}
e917630
%doc README.rst
e917630
%license LICENSE
e917630
%{python2_sitelib}/designateclient
e917630
%exclude %{python2_sitelib}/%{sname}/tests
e917630
%{python2_sitelib}/*.egg-info
e917630
%{_bindir}/designate
e917630
%{_bindir}/designate-2
e917630
%{_bindir}/designate-%{python2_version}
e917630
e917630
%files -n python2-%{sname}-tests
e917630
%{python2_sitelib}/%{sname}/tests
e917630
e917630
%if 0%{?with_python3}
e917630
%files -n python3-%{sname}
Victoria Martínez de la Cruz 6969687
%license LICENSE
f7411d7
%doc README.rst
e917630
%{python3_sitelib}/%{sname}
e917630
%exclude %{python3_sitelib}/%{sname}/tests
e917630
%{python3_sitelib}/*.egg-info
e917630
%{_bindir}/designate-3
e917630
%{_bindir}/designate-%{python3_version}
e917630
e917630
%files -n python3-%{sname}-tests
e917630
%{python3_sitelib}/%{sname}/tests
e917630
%endif
e917630
e917630
%files doc
e917630
%doc html
f7411d7
%license LICENSE
b281c6d
f7411d7
%changelog
5ac4cde
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
5ac4cde
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5ac4cde
f7411d7
* Wed Mar 23 2016 RDO <rdo-list@redhat.com> 2.0.0-0.1
f7411d7
-  Rebuild for Mitaka