Blob Blame Raw
# Macros for py2/py3 compatibility
%if 0%{?fedora} || 0%{?rhel} > 7
%global pyver %{python3_pkgversion}
%global pyver 2

%global pyver_bin python%{pyver}
%global pyver_sitelib %python%{pyver}_sitelib
%global pyver_install %py%{pyver}_install
%global pyver_build %py%{pyver}_build
# End of macros for py2/py3 compatibility

%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global with_doc 1

%global common_desc \
Client library and command line utility for interacting with Openstack Designate API

%global sname designateclient

Name:       python-%{sname}
Version:    2.11.0
Release:    4%{?dist}
Summary:    Python API and CLI for OpenStack Designate

License:    ASL 2.0

BuildArch:  noarch

BuildRequires: git


%package -n python%{pyver}-%{sname}
Summary:    Python API and CLI for OpenStack Designate
%{?python_provide:%python_provide python%{pyver}-%{sname}}

BuildRequires: python%{pyver}-devel
BuildRequires: python%{pyver}-setuptools
BuildRequires: python%{pyver}-pbr

Requires: python%{pyver}-pbr
Requires: python%{pyver}-keystoneauth1 >= 3.4.0
Requires: python%{pyver}-requests >= 2.14.2
Requires: python%{pyver}-six >= 1.10.0
Requires: python%{pyver}-stevedore
Requires: python%{pyver}-osc-lib >= 1.8.0
Requires: python%{pyver}-debtcollector
Requires: python%{pyver}-oslo-utils >= 3.33.0
Requires: python%{pyver}-oslo-serialization >= 2.18.0
Requires: python%{pyver}-cliff
Requires: python%{pyver}-jsonschema >= 2.6.0

%description -n python%{pyver}-%{sname}

%package -n python%{pyver}-%{sname}-tests
Summary:    Python API and CLI for OpenStack Designate (tests)
%{?python_provide:%python_provide python%{pyver}-%{sname}-tests}
Requires:	python%{pyver}-%{sname} = %{version}-%{release}

%description -n python%{pyver}-%{sname}-tests

This package contains Designate client tests files.

%if 0%{?with_doc}
%package doc
Summary:          Documentation for OpenStack Designate API Client

BuildRequires:    python%{pyver}-sphinx
BuildRequires:    python%{pyver}-openstackdocstheme
BuildRequires:    python%{pyver}-keystoneauth1
BuildRequires:    python%{pyver}-osc-lib
BuildRequires:    python%{pyver}-jsonschema

%description      doc

This package contains auto-generated documentation.

%autosetup -n %{name}-%{upstream_version} -S git

rm -rf *requirements.txt


%if 0%{?with_doc}
%{pyver_bin} build_sphinx -b html


%files -n python%{pyver}-%{sname}

%doc README.rst
%license LICENSE

%exclude %{pyver_sitelib}/%{sname}/tests

%files -n python%{pyver}-%{sname}-tests

%if 0%{?with_doc}
%files doc
%doc doc/build/html
%license LICENSE

* Thu Oct 03 2019 Miro Hrončok <> - 2.11.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <> - 2.11.0-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <> - 2.11.0-2
- Rebuilt for

* Tue Mar 12 2019 RDO <> 2.11.0-1
- Update to 2.11.0