Igor Gnatenko 874e4f
%global modname iniparse
Tim Lauridsen 22ba08
Igor Gnatenko 874e4f
# Use the same directory of the main package for subpackage licence and docs
Igor Gnatenko 874e4f
%global _docdir_fmt %{name}
Tim Lauridsen 8f7cb9
Igor Gnatenko 874e4f
Name:           python-%{modname}
Tim Lauridsen 89d603
Version:        0.4
3ae33d
Release:        22%{?dist}
Tim Lauridsen 8f7cb9
Summary:        Python Module for Accessing and Modifying Configuration Data in INI files
4012c5
License:        MIT and Python
Tim Lauridsen 8f7cb9
URL:            http://code.google.com/p/iniparse/
Igor Gnatenko 874e4f
Source0:        http://iniparse.googlecode.com/files/%{modname}-%{version}.tar.gz
Tim Lauridsen e42247
Patch0:         fix-issue-28.patch
Tim Lauridsen 22ba08
# The patch upstream (http://code.google.com/p/iniparse/issues/detail?id=22)
Tim Lauridsen 22ba08
# is Python3-only. The patch below uses python-six to create a version that works
Tim Lauridsen 22ba08
# with both Python major versions and is more error-prone.
Tim Lauridsen 22ba08
Patch1:         %{name}-python3-compat.patch
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
BuildArch: noarch
Tim Lauridsen 8f7cb9
Igor Gnatenko 27867d
%global _description \
Igor Gnatenko 27867d
iniparse is an INI parser for Python which is API compatible\
Igor Gnatenko 27867d
with the standard library's ConfigParser, preserves structure of INI\
Igor Gnatenko 27867d
files (order of sections & options, indentation, comments, and blank\
Igor Gnatenko 27867d
lines are preserved when data is updated), and is more convenient to\
Tim Lauridsen 8f7cb9
use.
Tim Lauridsen 8f7cb9
Igor Gnatenko 27867d
%description %{_description}
Igor Gnatenko 27867d
Igor Gnatenko 874e4f
%package -n python2-%{modname}
Igor Gnatenko 874e4f
Summary:        Python 2 Module for Accessing and Modifying Configuration Data in INI files
Igor Gnatenko 874e4f
%{?python_provide:%python_provide python2-%{modname}}
Igor Gnatenko 874e4f
BuildRequires:  python2-devel
Igor Gnatenko 874e4f
BuildRequires:  python2-six
Igor Gnatenko 874e4f
BuildRequires:  python-test
Igor Gnatenko 874e4f
Requires:       python2-six
Igor Gnatenko 874e4f
Igor Gnatenko 27867d
%description -n python2-%{modname} %{_description}
Igor Gnatenko 27867d
Igor Gnatenko 27867d
Python 2 version.
Igor Gnatenko 874e4f
Igor Gnatenko 874e4f
%package -n python3-%{modname}
Igor Gnatenko 27867d
Summary:        %{summary}
Igor Gnatenko 27867d
%{?system_python_abi}
Igor Gnatenko 874e4f
%{?python_provide:%python_provide python3-%{modname}}
Igor Gnatenko 874e4f
BuildRequires:  python3-devel
Igor Gnatenko 874e4f
BuildRequires:  python3-six
Igor Gnatenko 874e4f
BuildRequires:  python3-test
Tim Lauridsen 22ba08
Requires:       python3-six
Tim Lauridsen 22ba08
Igor Gnatenko 27867d
%description -n python3-%{modname} %{_description}
Igor Gnatenko 27867d
Igor Gnatenko 27867d
Python 3 version.
Tim Lauridsen 22ba08
Tim Lauridsen 8f7cb9
%prep
Igor Gnatenko 874e4f
%setup -q -n %{modname}-%{version}
Tim Lauridsen e42247
%patch0 -p1
Tim Lauridsen 22ba08
%patch1 -p0
Igor Gnatenko 874e4f
chmod -c -x html/index.html
Tim Lauridsen 22ba08
Tim Lauridsen 8f7cb9
%build
Igor Gnatenko 874e4f
%py2_build
Igor Gnatenko 874e4f
%if %{with python3}
Igor Gnatenko 874e4f
%py3_build
Tim Lauridsen 22ba08
%endif
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%install
Igor Gnatenko 874e4f
%py2_install
Igor Gnatenko 874e4f
%py3_install
Igor Gnatenko 874e4f
rm -vfr %{buildroot}%{_docdir}/*
Tim Lauridsen 8f7cb9
Tim Lauridsen 61f375
%check
Tim Lauridsen 61f375
%{__python2} runtests.py
Tim Lauridsen 4a4c54
%{__python3} runtests.py
Tim Lauridsen 4a4c54
Igor Gnatenko 874e4f
%files -n python2-%{modname}
4012c5
%license LICENSE LICENSE-PSF
Igor Gnatenko 874e4f
%doc README Changelog html/
Igor Gnatenko 874e4f
%{python2_sitelib}/%{modname}/
Igor Gnatenko 874e4f
%{python2_sitelib}/%{modname}-%{version}-*.egg-info
Tim Lauridsen 8f7cb9
Igor Gnatenko 874e4f
%files -n python3-%{modname}
4012c5
%license LICENSE LICENSE-PSF
Igor Gnatenko 874e4f
%doc README Changelog html/
Igor Gnatenko 874e4f
%{python3_sitelib}/%{modname}/
Igor Gnatenko 874e4f
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%changelog
3ae33d
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22
3ae33d
- Rebuild for Python 3.6
3ae33d
Igor Gnatenko 27867d
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-21
Igor Gnatenko 27867d
- Cleanups
Igor Gnatenko 27867d
- Add %%{?system_python_abi}
Igor Gnatenko 27867d
2aa2ea
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-20
2aa2ea
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2aa2ea
Igor Gnatenko 874e4f
* Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-19
Igor Gnatenko 874e4f
- Make python3 builds conditionally
Igor Gnatenko 874e4f
- Adopt to new packaging guidelines
Igor Gnatenko 874e4f
- Remove setuptools from BRs as it's not needed
Igor Gnatenko 874e4f
- Cleanup spec
Igor Gnatenko 874e4f
416ba6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-18
416ba6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
416ba6
Robert Kuska e9e4fd
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.4-17
Robert Kuska e9e4fd
- Rebuilt for Python3.5 rebuild
Robert Kuska e9e4fd
24a9fc
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-16
24a9fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
24a9fc
4012c5
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 0.4-15
4012c5
- fix license handling
4012c5
788a6d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-14
788a6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
788a6d
67e832
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-13
67e832
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
67e832
Tim Lauridsen 4a4c54
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-12
Tim Lauridsen 4a4c54
- added python3-test to buildreq for python3 
Tim Lauridsen 4a4c54
- run unittest with python3 also
Tim Lauridsen 4a4c54
Tim Lauridsen 6cfa2e
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-11
Tim Lauridsen 6cfa2e
- added python-test to buildreq, for unittests
Tim Lauridsen 6cfa2e
Tim Lauridsen 61f375
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-10
Tim Lauridsen 61f375
- added %%check to run unittests when build
Tim Lauridsen 61f375
- updated fix-issue-28.patch, so test cases dont fail
Tim Lauridsen 61f375
Tim Lauridsen 22ba08
* Fri Sep 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-9
Tim Lauridsen 22ba08
- Introduce python3 subpackage.
Tim Lauridsen 22ba08
- Use %%__python2 instead of %%__python.
Tim Lauridsen 22ba08
1b7eda
* Mon Jul 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4-8
1b7eda
- Install docs to %%{_pkgdocdir} where available.
1b7eda
f35900
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
f35900
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f35900
Tim Lauridsen e42247
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-6
Tim Lauridsen e42247
- fix for upstream issue 28
Tim Lauridsen e42247
0d84ad
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
0d84ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0d84ad
ad1b39
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
ad1b39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ad1b39
7d0232
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
7d0232
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7d0232
452cb3
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4-2
452cb3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
452cb3
Tim Lauridsen 57f8c8
Tim Lauridsen 89d603
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-1
Tim Lauridsen 89d603
- Release 0.4
Tim Lauridsen 89d603
Tim Lauridsen 57f8c8
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-2
Tim Lauridsen 57f8c8
- removed patch
Tim Lauridsen 57f8c8
Tim Lauridsen 29eb7e
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-1
Tim Lauridsen 29eb7e
- Release 0.3.1
Tim Lauridsen 29eb7e
-   Fix empty-line handling bugs introduced in 0.3.0 
Tim Lauridsen 29eb7e
f9693a
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
f9693a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f9693a
Tim Lauridsen d8498c
* Mon Mar 2 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-2
Tim Lauridsen d8498c
- added patch from upstream to fix regrestion :
Tim Lauridsen d8498c
Tim Lauridsen 4d36ba
* Sat Feb 28 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-1
Tim Lauridsen 4d36ba
- Release 0.3.0
Tim Lauridsen 4d36ba
-  Fix handling of continuation lines
Tim Lauridsen 4d36ba
-  Fix DEFAULT handling
Tim Lauridsen 4d36ba
-  Fix picking/unpickling 
Tim Lauridsen 4d36ba
a66d8d
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
a66d8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a66d8d
Tim Lauridsen cff60a
* Sun Dec 7 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.4-1
Tim Lauridsen cff60a
- Release 0.2.4:
Tim Lauridsen cff60a
-   Updated to work with Python-2.6 (Python-2.4 and 2.5 are still supported)
Tim Lauridsen cff60a
-   Support for files opened in unicode mode
Tim Lauridsen cff60a
-   Fixed Python-3.0 compatibility warnings
Tim Lauridsen cff60a
-   Minor API cleanup 
b6031d
* Fri Nov 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.3-5
b6031d
- Rebuild for Python 2.6
Tim Lauridsen a7e938
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
Igor Gnatenko 27867d
- own the %%{_docdir}/python-iniparse-%%{version} directory
Tim Lauridsen f2700a
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
Tim Lauridsen f2700a
- handle egg-info too
Tim Lauridsen d74f2a
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
Tim Lauridsen d74f2a
- removed patch source line
Tim Lauridsen b4e070
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-1
Tim Lauridsen b4e070
- Updates to release 0.2.3
Tim Lauridsen b4e070
- removed empty ini file patch, it is included in 0.2.3
Tim Lauridsen 048ab3
* Mon Nov 19 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-2
Tim Lauridsen 048ab3
- Added upstream patch to fix problems with empty ini files.
Tim Lauridsen 855356
* Tue Sep 25 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-1
Tim Lauridsen 855356
- Updated to release 0.2.2
Tim Lauridsen 855356
- removed patch to to fix problems with out commented lines, included in upstream source
Tim Lauridsen 1a8b9e
* Wed Sep 12 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-4
Tim Lauridsen 1a8b9e
- Added some logic to get the right python-setuptools buildrequeres
Tim Lauridsen 1a8b9e
- based on the fedora version, to make the same spec file useful in
Tim Lauridsen 1a8b9e
- all fedora releases.
Tim Lauridsen ddc9e8
* Mon Sep 10 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-3
Tim Lauridsen ddc9e8
- Added patch from upstream svn to fix problems with out commented lines.
Tim Lauridsen 7decab
* Tue Aug 28 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-2
Tim Lauridsen 7decab
- Changed BuildRequires python-setuptools to python-setuptools-devel
Tim Lauridsen 8e3e66
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
Tim Lauridsen 8e3e66
- Release 0.2.1
Tim Lauridsen 8f7cb9
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
Igor Gnatenko 27867d
- relocated doc to %%{_docdir}/python-iniparse-%%{version}
Tim Lauridsen 8f7cb9
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
Tim Lauridsen 8f7cb9
- changed name from iniparse to python-iniparse
Tim Lauridsen 8f7cb9
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
Tim Lauridsen 8f7cb9
- Release 0.2
Tim Lauridsen 8f7cb9
- Added html/* to %%doc
Tim Lauridsen 8f7cb9
* Fri Jul 13 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.1-1
Tim Lauridsen 8f7cb9
- Initial build.