Add %%{?system_python_abi}
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
parent
2aa2eaf8ec
commit
27867dbd84
@ -3,36 +3,30 @@
|
|||||||
# Use the same directory of the main package for subpackage licence and docs
|
# Use the same directory of the main package for subpackage licence and docs
|
||||||
%global _docdir_fmt %{name}
|
%global _docdir_fmt %{name}
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
||||||
%bcond_with python3
|
|
||||||
%else
|
|
||||||
%bcond_without python3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 0.4
|
Version: 0.4
|
||||||
Release: 20%{?dist}
|
Release: 21%{?dist}
|
||||||
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
|
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
|
||||||
License: MIT and Python
|
License: MIT and Python
|
||||||
URL: http://code.google.com/p/iniparse/
|
URL: http://code.google.com/p/iniparse/
|
||||||
Source0: http://iniparse.googlecode.com/files/%{modname}-%{version}.tar.gz
|
Source0: http://iniparse.googlecode.com/files/%{modname}-%{version}.tar.gz
|
||||||
Patch0: fix-issue-28.patch
|
Patch0: fix-issue-28.patch
|
||||||
%if %{with python3}
|
|
||||||
# The patch upstream (http://code.google.com/p/iniparse/issues/detail?id=22)
|
# 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
|
# 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.
|
# with both Python major versions and is more error-prone.
|
||||||
Patch1: %{name}-python3-compat.patch
|
Patch1: %{name}-python3-compat.patch
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%global _description \
|
||||||
iniparse is an INI parser for Python which is API compatible
|
iniparse is an INI parser for Python which is API compatible\
|
||||||
with the standard library's ConfigParser, preserves structure of INI
|
with the standard library's ConfigParser, preserves structure of INI\
|
||||||
files (order of sections & options, indentation, comments, and blank
|
files (order of sections & options, indentation, comments, and blank\
|
||||||
lines are preserved when data is updated), and is more convenient to
|
lines are preserved when data is updated), and is more convenient to\
|
||||||
use.
|
use.
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
%package -n python2-%{modname}
|
%package -n python2-%{modname}
|
||||||
Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files
|
Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
@ -41,36 +35,27 @@ BuildRequires: python2-six
|
|||||||
BuildRequires: python-test
|
BuildRequires: python-test
|
||||||
Requires: python2-six
|
Requires: python2-six
|
||||||
|
|
||||||
%description -n python2-%{modname}
|
%description -n python2-%{modname} %{_description}
|
||||||
iniparse is an INI parser for Python 2 which is API compatible
|
|
||||||
with the standard library's configparser, preserves structure of INI
|
Python 2 version.
|
||||||
files (order of sections & options, indentation, comments, and blank
|
|
||||||
lines are preserved when data is updated), and is more convenient to
|
|
||||||
use.
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%package -n python3-%{modname}
|
%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}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
BuildRequires: python3-test
|
BuildRequires: python3-test
|
||||||
Requires: python3-six
|
Requires: python3-six
|
||||||
|
|
||||||
%description -n python3-%{modname}
|
%description -n python3-%{modname} %{_description}
|
||||||
iniparse is an INI parser for Python 3 which is API compatible
|
|
||||||
with the standard library's configparser, preserves structure of INI
|
Python 3 version.
|
||||||
files (order of sections & options, indentation, comments, and blank
|
|
||||||
lines are preserved when data is updated), and is more convenient to
|
|
||||||
use.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{modname}-%{version}
|
%setup -q -n %{modname}-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%if %{with python3}
|
|
||||||
%patch1 -p0
|
%patch1 -p0
|
||||||
%endif
|
|
||||||
chmod -c -x html/index.html
|
chmod -c -x html/index.html
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -81,16 +66,12 @@ chmod -c -x html/index.html
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%py2_install
|
||||||
%if %{with python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
|
||||||
rm -vfr %{buildroot}%{_docdir}/*
|
rm -vfr %{buildroot}%{_docdir}/*
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} runtests.py
|
%{__python2} runtests.py
|
||||||
%if %{with python3}
|
|
||||||
%{__python3} runtests.py
|
%{__python3} runtests.py
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python2-%{modname}
|
%files -n python2-%{modname}
|
||||||
%license LICENSE LICENSE-PSF
|
%license LICENSE LICENSE-PSF
|
||||||
@ -98,15 +79,17 @@ rm -vfr %{buildroot}%{_docdir}/*
|
|||||||
%{python2_sitelib}/%{modname}/
|
%{python2_sitelib}/%{modname}/
|
||||||
%{python2_sitelib}/%{modname}-%{version}-*.egg-info
|
%{python2_sitelib}/%{modname}-%{version}-*.egg-info
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-%{modname}
|
%files -n python3-%{modname}
|
||||||
%license LICENSE LICENSE-PSF
|
%license LICENSE LICENSE-PSF
|
||||||
%doc README Changelog html/
|
%doc README Changelog html/
|
||||||
%{python3_sitelib}/%{modname}/
|
%{python3_sitelib}/%{modname}/
|
||||||
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
|
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-21
|
||||||
|
- Cleanups
|
||||||
|
- Add %%{?system_python_abi}
|
||||||
|
|
||||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-20
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-20
|
||||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
- 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 <ivazqueznet+rpm@gmail.com> - 0.2.3-5
|
* Fri Nov 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.3-5
|
||||||
- Rebuild for Python 2.6
|
- Rebuild for Python 2.6
|
||||||
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
|
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
|
||||||
- own the %%{_docdir}/python-iniparse-%{version} directory
|
- own the %%{_docdir}/python-iniparse-%%{version} directory
|
||||||
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
|
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
|
||||||
- handle egg-info too
|
- handle egg-info too
|
||||||
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
|
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
|
||||||
@ -229,7 +212,7 @@ rm -vfr %{buildroot}%{_docdir}/*
|
|||||||
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
|
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
|
||||||
- Release 0.2.1
|
- Release 0.2.1
|
||||||
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
|
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
|
||||||
- relocated doc to %{_docdir}/python-iniparse-%{version}
|
- relocated doc to %%{_docdir}/python-iniparse-%%{version}
|
||||||
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
|
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
|
||||||
- changed name from iniparse to python-iniparse
|
- changed name from iniparse to python-iniparse
|
||||||
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
|
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
|
||||||
|
Loading…
Reference in New Issue
Block a user