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}
3624f74
Version:    2.3.0
b78539d
Release:    8%{?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
84505bd
BuildRequires: python2-setuptools
84505bd
BuildRequires: python2-pbr
84505bd
84505bd
Requires: python2-cliff
84505bd
Requires: python2-jsonschema >= 2.0.0
84505bd
Requires: python2-pbr
84505bd
Requires: python2-keystoneauth1
84505bd
Requires: python2-requests >= 2.2.0
84505bd
Requires: python2-six >= 1.9.0
84505bd
Requires: python2-stevedore
84505bd
Requires: python2-osc-lib
84505bd
Requires: python2-debtcollector
84505bd
Requires: python2-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}
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
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
3624f74
Requires: python3-osc-lib
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}
84505bd
Requires:	python2-%{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
84505bd
BuildRequires:    python2-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
b78539d
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-8
b78539d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b78539d
febdd2c
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-7
febdd2c
- Rebuilt for Python 3.7
febdd2c
84505bd
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.3.0-6
84505bd
- Update Python 2 dependency declarations to new packaging standards
84505bd
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
84505bd
9586093
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-5
9586093
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9586093
5041179
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-4
5041179
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5041179
61c5510
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-3
61c5510
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
61c5510
32bd10a
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-2
32bd10a
- Rebuild for Python 3.6
32bd10a
3624f74
* Mon Sep 12 2016 Haikel Guemar <hguemar@fedoraproject.org> 2.3.0-1
3624f74
- Update to 2.3.0
9d67e6d