8d5578
%global modname iniparse
8d5578
8d5578
# Use the same directory of the main package for subpackage licence and docs
8d5578
%global _docdir_fmt %{name}
8d5578
8d5578
Name:           python-%{modname}
8d5578
Version:        0.4
8d5578
Release:        31%{?dist}
8d5578
Summary:        Python Module for Accessing and Modifying Configuration Data in INI files
8d5578
License:        MIT and Python
8d5578
URL:            http://code.google.com/p/iniparse/
8d5578
Source0:        http://iniparse.googlecode.com/files/%{modname}-%{version}.tar.gz
8d5578
Patch0:         fix-issue-28.patch
8d5578
# The patch upstream (http://code.google.com/p/iniparse/issues/detail?id=22)
8d5578
# is Python3-only. The patch below uses python-six to create a version that works
8d5578
# with both Python major versions and is more error-prone.
8d5578
Patch1:         %{name}-python3-compat.patch
8d5578
# Fixup the module to have proper setup.py information
8d5578
Patch2:         %{name}-setup-fixes.patch
8d5578
8d5578
BuildArch: noarch
8d5578
8d5578
%global _description \
8d5578
iniparse is an INI parser for Python which is API compatible\
8d5578
with the standard library's ConfigParser, preserves structure of INI\
8d5578
files (order of sections & options, indentation, comments, and blank\
8d5578
lines are preserved when data is updated), and is more convenient to\
8d5578
use.
8d5578
8d5578
%description %{_description}
8d5578
8d5578
%package -n python3-%{modname}
8d5578
Summary:        %{summary}
8d5578
%{?python_provide:%python_provide python3-%{modname}}
8d5578
BuildRequires:  python3-devel
8d5578
BuildRequires:  python3-setuptools
8d5578
BuildRequires:  python3-six
8d5578
BuildRequires:  python3-test
8d5578
Requires:       python3-six
8d5578
Obsoletes:      platform-python-%{modname} < %{version}-%{release}
8d5578
8d5578
%description -n python3-%{modname} %{_description}
8d5578
8d5578
%prep
8d5578
%setup -q -n %{modname}-%{version}
8d5578
%patch0 -p1
8d5578
%patch1 -p0
8d5578
%patch2 -p0
8d5578
chmod -c -x html/index.html
8d5578
8d5578
%build
8d5578
%py3_build
8d5578
8d5578
%install
8d5578
%py3_install
8d5578
rm -vfr %{buildroot}%{_docdir}/*
8d5578
8d5578
%check
8d5578
%{__python3} runtests.py
8d5578
8d5578
%files -n python3-%{modname}
8d5578
%license LICENSE LICENSE-PSF
8d5578
%doc README Changelog html/
8d5578
%{python3_sitelib}/%{modname}/
8d5578
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
8d5578
8d5578
%changelog
8d5578
* Thu May 31 2018 Petr Viktorin <pviktori@redhat.com> - 0.4-31
8d5578
- Remove Python 2 subpackage
8d5578
  https://bugzilla.redhat.com/show_bug.cgi?id=1567873
8d5578
8d5578
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-30
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8d5578
8d5578
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.4-29
8d5578
- Fix ambiguous Python 2 dependency declarations
8d5578
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
8d5578
8d5578
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-28
8d5578
- Use better Obsoletes for platform-python
8d5578
8d5578
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-27
8d5578
- Remove platform-python subpackage
8d5578
8d5578
* Thu Aug 10 2017 Miro Hrončok <mhroncok@redhat.com> - 0.4-26
8d5578
- Add platform-python package
8d5578
- Add bconds
8d5578
- Remove %%{?system_python_abi}
8d5578
8d5578
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-25
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8d5578
8d5578
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-24
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8d5578
8d5578
* Sun Dec 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.4-23
8d5578
- Add patch to update setup.py to use setuptools and declare install dependencies
8d5578
8d5578
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22
8d5578
- Rebuild for Python 3.6
8d5578
8d5578
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-21
8d5578
- Cleanups
8d5578
- Add %%{?system_python_abi}
8d5578
8d5578
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-20
8d5578
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8d5578
8d5578
* Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-19
8d5578
- Make python3 builds conditionally
8d5578
- Adopt to new packaging guidelines
8d5578
- Remove setuptools from BRs as it's not needed
8d5578
- Cleanup spec
8d5578
8d5578
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-18
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8d5578
8d5578
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.4-17
8d5578
- Rebuilt for Python3.5 rebuild
8d5578
8d5578
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-16
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8d5578
8d5578
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 0.4-15
8d5578
- fix license handling
8d5578
8d5578
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-14
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8d5578
8d5578
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-13
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
8d5578
8d5578
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-12
8d5578
- added python3-test to buildreq for python3 
8d5578
- run unittest with python3 also
8d5578
8d5578
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-11
8d5578
- added python-test to buildreq, for unittests
8d5578
8d5578
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-10
8d5578
- added %%check to run unittests when build
8d5578
- updated fix-issue-28.patch, so test cases dont fail
8d5578
8d5578
* Fri Sep 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-9
8d5578
- Introduce python3 subpackage.
8d5578
- Use %%__python2 instead of %%__python.
8d5578
8d5578
* Mon Jul 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4-8
8d5578
- Install docs to %%{_pkgdocdir} where available.
8d5578
8d5578
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8d5578
8d5578
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-6
8d5578
- fix for upstream issue 28
8d5578
8d5578
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8d5578
8d5578
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8d5578
8d5578
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8d5578
8d5578
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4-2
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
8d5578
8d5578
8d5578
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-1
8d5578
- Release 0.4
8d5578
8d5578
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-2
8d5578
- removed patch
8d5578
8d5578
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-1
8d5578
- Release 0.3.1
8d5578
-   Fix empty-line handling bugs introduced in 0.3.0 
8d5578
8d5578
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8d5578
8d5578
* Mon Mar 2 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-2
8d5578
- added patch from upstream to fix regrestion :
8d5578
8d5578
* Sat Feb 28 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-1
8d5578
- Release 0.3.0
8d5578
-  Fix handling of continuation lines
8d5578
-  Fix DEFAULT handling
8d5578
-  Fix picking/unpickling 
8d5578
8d5578
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
8d5578
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8d5578
8d5578
* Sun Dec 7 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.4-1
8d5578
- Release 0.2.4:
8d5578
-   Updated to work with Python-2.6 (Python-2.4 and 2.5 are still supported)
8d5578
-   Support for files opened in unicode mode
8d5578
-   Fixed Python-3.0 compatibility warnings
8d5578
-   Minor API cleanup 
8d5578
* Fri Nov 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.3-5
8d5578
- Rebuild for Python 2.6
8d5578
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
8d5578
- own the %%{_docdir}/python-iniparse-%%{version} directory
8d5578
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
8d5578
- handle egg-info too
8d5578
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
8d5578
- removed patch source line
8d5578
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-1
8d5578
- Updates to release 0.2.3
8d5578
- removed empty ini file patch, it is included in 0.2.3
8d5578
* Mon Nov 19 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-2
8d5578
- Added upstream patch to fix problems with empty ini files.
8d5578
* Tue Sep 25 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-1
8d5578
- Updated to release 0.2.2
8d5578
- removed patch to to fix problems with out commented lines, included in upstream source
8d5578
* Wed Sep 12 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-4
8d5578
- Added some logic to get the right python-setuptools buildrequeres
8d5578
- based on the fedora version, to make the same spec file useful in
8d5578
- all fedora releases.
8d5578
* Mon Sep 10 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-3
8d5578
- Added patch from upstream svn to fix problems with out commented lines.
8d5578
* Tue Aug 28 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-2
8d5578
- Changed BuildRequires python-setuptools to python-setuptools-devel
8d5578
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
8d5578
- Release 0.2.1
8d5578
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
8d5578
- relocated doc to %%{_docdir}/python-iniparse-%%{version}
8d5578
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
8d5578
- changed name from iniparse to python-iniparse
8d5578
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
8d5578
- Release 0.2
8d5578
- Added html/* to %%doc
8d5578
* Fri Jul 13 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.1-1
8d5578
- Initial build.