f7411d7
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
7b1a76b
7b1a76b
%global common_desc \
7b1a76b
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}
7b1a76b
Version:    2.9.0
7b1a76b
Release:    1%{?dist}
f7411d7
Summary:    Python API and CLI for OpenStack Designate
f7411d7
f7411d7
License:    ASL 2.0
e917630
URL:        https://launchpad.net/python-%{sname}/
7b1a76b
Source0:    https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
f7411d7
f7411d7
BuildArch:  noarch
f7411d7
7b1a76b
BuildRequires: git
7b1a76b
e917630
%description
7b1a76b
%{common_desc}
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
84505bd
BuildRequires: python2-setuptools
84505bd
BuildRequires: python2-pbr
84505bd
84505bd
Requires: python2-pbr
7b1a76b
Requires: python2-keystoneauth1 >= 3.3.0
7b1a76b
Requires: python2-requests >= 2.14.2
7b1a76b
Requires: python2-six >= 1.10.0
84505bd
Requires: python2-stevedore
7b1a76b
Requires: python2-osc-lib >= 1.8.0
84505bd
Requires: python2-debtcollector
7b1a76b
Requires: python2-oslo-utils >= 3.33.0
7b1a76b
%if 0%{?fedora} > 0
7b1a76b
Requires: python2-cliff
7b1a76b
Requires: python2-jsonschema >= 2.6.0
7b1a76b
%else
7b1a76b
Requires: python-cliff
7b1a76b
Requires: python-jsonschema >= 2.6.0
7b1a76b
%endif
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}
84505bd
Requires:	python2-%{sname} = %{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
7b1a76b
Requires: python3-jsonschema >= 2.6.0
e917630
Requires: python3-pbr
7b1a76b
Requires: python3-keystoneauth1 >= 3.3.0
7b1a76b
Requires: python3-requests >= 2.14.2
7b1a76b
Requires: python3-six >= 1.10.0
e917630
Requires: python3-stevedore
7b1a76b
Requires: python3-osc-lib >= 1.8.0
e917630
Requires: python3-debtcollector
7b1a76b
Requires: python3-oslo-utils >= 3.33.0
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}
7b1a76b
Requires:	python3-%{sname} = %{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
84505bd
BuildRequires:    python2-sphinx
7b1a76b
BuildRequires:    python2-openstackdocstheme
7b1a76b
BuildRequires:    python2-keystoneauth1
7b1a76b
BuildRequires:    python2-osc-lib
7b1a76b
%if 0%{?fedora} > 0
7b1a76b
BuildRequires:    python2-jsonschema
7b1a76b
%else
7b1a76b
BuildRequires:    python-jsonschema
7b1a76b
%endif
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
7b1a76b
%autosetup -n %{name}-%{upstream_version} -S git
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
7b1a76b
%{__python2} setup.py build_sphinx -b 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
7b1a76b
%doc doc/build/html
f7411d7
%license LICENSE
b281c6d
f7411d7
%changelog
7b1a76b
* Sun Feb 11 2018 RDO <dev@lists.rdoproject.org> 2.9.0-1
7b1a76b
- Update to 2.9.0
9d67e6d