From 979a6326fa9c1b65e92be9635f7701e5c4098d43 Mon Sep 17 00:00:00 2001 From: Ricardo Cordeiro Date: Sat, 31 Dec 2016 16:02:22 +0000 Subject: 0.1.3-1: Added python3 sub-package for the releases that have the necessary dependencies --- SPECS/python-novaclient-os-diskconfig.spec | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/SPECS/python-novaclient-os-diskconfig.spec b/SPECS/python-novaclient-os-diskconfig.spec index 91b8a58..13bac90 100644 --- a/SPECS/python-novaclient-os-diskconfig.spec +++ b/SPECS/python-novaclient-os-diskconfig.spec @@ -1,6 +1,10 @@ %global srcname novaclient-os-diskconfig %global upstreamname os_diskconfig_python_novaclient_ext +%if 0%{?fedora} >= 25 +%global with_python3 1 +%endif + Name: python-%{srcname} Version: 0.1.3 Release: 1%{?dist} @@ -13,9 +17,13 @@ Source0: http://pypi.python.org/packages/source/o/%{upstreamname}/%{upstreamname BuildArch: noarch BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif %description %{summary} + %package -n python2-%{srcname} Summary: %{summary} BuildRequires: python-novaclient @@ -25,22 +33,51 @@ Requires: python-novaclient %description -n python2-%{srcname} %{summary} +%if 0%{?with_python3} +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-novaclient +Requires: python3-novaclient +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +%{summary} +%endif + %prep %autosetup -n %{upstreamname}-%{version} %build %py2_build +%if 0%{?with_python3} +%py3_build +%endif %install %py2_install +%if 0%{?with_python3} +%py3_install +%endif %check %{__python2} setup.py test +%if 0%{?with_python3} +%{__python3} setup.py test +%endif %files -n python2-%{srcname} %doc README.rst %{python2_sitelib}/* +%if 0%{?with_python3} +%files -n python3-%{srcname} +%doc README.rst +%{python3_sitelib}/* +%endif + %changelog +* Sat Dec 31 2016 Ricardo Cordeiro - 0.1.3-1 +- Added python3 sub-package for the releases that have the necessary dependencies + * Thu Mar 03 2016 Ricardo Cordeiro - 0.1.3-1 - Initial package -- cgit