From 27867dbd84309ddb4ee5b7a62026ed053891b95b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 9 Aug 2016 14:26:52 +0200 Subject: [PATCH] Add %%{?system_python_abi} Signed-off-by: Igor Gnatenko --- python-iniparse.spec | 61 ++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/python-iniparse.spec b/python-iniparse.spec index 219479b..85973ba 100644 --- a/python-iniparse.spec +++ b/python-iniparse.spec @@ -3,36 +3,30 @@ # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} -%if 0%{?rhel} && 0%{?rhel} <= 7 -%bcond_with python3 -%else -%bcond_without python3 -%endif - Name: python-%{modname} Version: 0.4 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Python Module for Accessing and Modifying Configuration Data in INI files License: MIT and Python URL: http://code.google.com/p/iniparse/ Source0: http://iniparse.googlecode.com/files/%{modname}-%{version}.tar.gz Patch0: fix-issue-28.patch -%if %{with python3} # The patch upstream (http://code.google.com/p/iniparse/issues/detail?id=22) # is Python3-only. The patch below uses python-six to create a version that works # with both Python major versions and is more error-prone. Patch1: %{name}-python3-compat.patch -%endif BuildArch: noarch -%description -iniparse is an INI parser for Python which is API compatible -with the standard library's ConfigParser, preserves structure of INI -files (order of sections & options, indentation, comments, and blank -lines are preserved when data is updated), and is more convenient to +%global _description \ +iniparse is an INI parser for Python which is API compatible\ +with the standard library's ConfigParser, preserves structure of INI\ +files (order of sections & options, indentation, comments, and blank\ +lines are preserved when data is updated), and is more convenient to\ use. +%description %{_description} + %package -n python2-%{modname} Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files %{?python_provide:%python_provide python2-%{modname}} @@ -41,36 +35,27 @@ BuildRequires: python2-six BuildRequires: python-test Requires: python2-six -%description -n python2-%{modname} -iniparse is an INI parser for Python 2 which is API compatible -with the standard library's configparser, preserves structure of INI -files (order of sections & options, indentation, comments, and blank -lines are preserved when data is updated), and is more convenient to -use. +%description -n python2-%{modname} %{_description} + +Python 2 version. -%if %{with python3} %package -n python3-%{modname} -Summary: Python 3 Module for Accessing and Modifying Configuration Data in INI files +Summary: %{summary} +%{?system_python_abi} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-six BuildRequires: python3-test Requires: python3-six -%description -n python3-%{modname} -iniparse is an INI parser for Python 3 which is API compatible -with the standard library's configparser, preserves structure of INI -files (order of sections & options, indentation, comments, and blank -lines are preserved when data is updated), and is more convenient to -use. -%endif +%description -n python3-%{modname} %{_description} + +Python 3 version. %prep %setup -q -n %{modname}-%{version} %patch0 -p1 -%if %{with python3} %patch1 -p0 -%endif chmod -c -x html/index.html %build @@ -81,16 +66,12 @@ chmod -c -x html/index.html %install %py2_install -%if %{with python3} %py3_install -%endif rm -vfr %{buildroot}%{_docdir}/* %check %{__python2} runtests.py -%if %{with python3} %{__python3} runtests.py -%endif %files -n python2-%{modname} %license LICENSE LICENSE-PSF @@ -98,15 +79,17 @@ rm -vfr %{buildroot}%{_docdir}/* %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}-*.egg-info -%if %{with python3} %files -n python3-%{modname} %license LICENSE LICENSE-PSF %doc README Changelog html/ %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}-*.egg-info -%endif %changelog +* Tue Aug 09 2016 Igor Gnatenko - 0.4-21 +- Cleanups +- Add %%{?system_python_abi} + * Tue Jul 19 2016 Fedora Release Engineering - 0.4-20 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages @@ -205,7 +188,7 @@ rm -vfr %{buildroot}%{_docdir}/* * Fri Nov 28 2008 Ignacio Vazquez-Abrams - 0.2.3-5 - Rebuild for Python 2.6 * Tue Jan 8 2008 Tim Lauridsen - 0.2.3-4 -- own the %%{_docdir}/python-iniparse-%{version} directory +- own the %%{_docdir}/python-iniparse-%%{version} directory * Tue Dec 11 2007 Tim Lauridsen - 0.2.3-3 - handle egg-info too * Tue Dec 11 2007 Tim Lauridsen - 0.2.3-2 @@ -229,7 +212,7 @@ rm -vfr %{buildroot}%{_docdir}/* * Tue Aug 7 2007 Paramjit Oberoi - 0.2.1-1 - Release 0.2.1 * Fri Jul 27 2007 Tim Lauridsen - 0.2-3 -- relocated doc to %{_docdir}/python-iniparse-%{version} +- relocated doc to %%{_docdir}/python-iniparse-%%{version} * Thu Jul 26 2007 Tim Lauridsen - 0.2-2 - changed name from iniparse to python-iniparse * Tue Jul 17 2007 Tim Lauridsen - 0.2-1