From 4154bef4a197c3a5ebb7078f8056633d679fa94a Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Nov 16 2017 19:52:44 +0000 Subject: Use unified macros for Python 3 --- diff --git a/python-xapp.spec b/python-xapp.spec index 612de2e..acf001d 100644 --- a/python-xapp.spec +++ b/python-xapp.spec @@ -4,18 +4,15 @@ %bcond_with python3 %endif # 0#{?fedora} || 0#{?rhel} >= 7 -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global py3ver 3 -%else # 0#{?fedora} || 0#{?rhel} >= 7 -%global py3ver 34 -%endif # 0#{?fedora} || 0#{?rhel} >= 7 +# this is only turned on during transitional periods +%{?python3_next_pkgversion: %global with_python3_next 1} %global sum Python bindings for xapps Name: python-xapp Version: 1.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: %{sum} License: LGPLv2 @@ -50,23 +47,37 @@ Requires: python-psutil %if %{with python3} -%package -n python%{py3ver}-xapp +%package -n python%{python3_pkgversion}-xapp Summary: %{sum} -BuildRequires: python%{py3ver}-devel -BuildRequires: python%{py3ver}-setuptools +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools -Requires: python%{py3ver}-psutil +Requires: python%{python3_pkgversion}-psutil -%if 0%{?fedora} || 0%{?rhel} >= 8 -%{?python_provide:%python_provide python%{py3ver}-xapp} -%endif # 0#{?fedora} || 0#{?rhel} >= 8 +%{?python_provide:%python_provide python%{python3_pkgversion}-xapp} -%description -n python%{py3ver}-xapp +%description -n python%{python3_pkgversion}-xapp %{sum}. %endif # with python3 +%if 0%{?with_python3_next} +%package -n python%{python3_next_pkgversion}-xapp +Summary: %{sum} + +BuildRequires: python%{python3_next_pkgversion}-devel +BuildRequires: python%{python3_next_pkgversion}-setuptools + +Requires: python%{python3_next_pkgversion}-psutil + +%{?python_provide:%python_provide python%{python3_next_pkgversion}-xapp} + +%description -n python%{python3_next_pkgversion}-xapp +%{sum}. +%endif # with_python3_next + + %prep %autosetup -p 1 @@ -76,6 +87,9 @@ Requires: python%{py3ver}-psutil %if %{with python3} %py3_build %endif # with python3 +%if 0%{?with_python3_next} +%py3_next_build +%endif # with_python3_next %install @@ -83,6 +97,9 @@ Requires: python%{py3ver}-psutil %if %{with python3} %py3_install %endif # with python3 +%if 0%{?with_python3_next} +%py3_next_install +%endif # with_python3_next %files -n python2-xapp @@ -93,7 +110,7 @@ Requires: python%{py3ver}-psutil %if %{with python3} -%files -n python%{py3ver}-xapp +%files -n python%{python3_pkgversion}-xapp %license COPYING debian/copyright %doc AUTHORS PKG-INFO README TODO debian/changelog %{python3_sitelib}/xapp @@ -101,7 +118,19 @@ Requires: python%{py3ver}-psutil %endif # with python3 +%if 0%{?with_python3_next} +%files -n python%{python3_next_pkgversion}-xapp +%license COPYING debian/copyright +%doc AUTHORS PKG-INFO README TODO debian/changelog +%{python3_next_sitelib}/xapp +%{python3_next_sitelib}/python_xapp-%{version}-py%{python3_next_version}.egg-info +%endif # with_python3_next + + %changelog +* Thu Nov 16 2017 Björn Esser - 1.0.1-6 +- Use unified macros for Python 3 + * Thu Aug 31 2017 Björn Esser - 1.0.1-5 - Build a Python3 compat pkg on RHEL7