874e4f
%global modname iniparse
Tim Lauridsen 22ba08
874e4f
# Use the same directory of the main package for subpackage licence and docs
874e4f
%global _docdir_fmt %{name}
Tim Lauridsen 8f7cb9
874e4f
Name:           python-%{modname}
Tim Lauridsen 89d603
Version:        0.4
e67194
Release:        33%{?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/
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
945066
# Fixup the module to have proper setup.py information
945066
Patch2:         %{name}-setup-fixes.patch
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
BuildArch: noarch
Tim Lauridsen 8f7cb9
27867d
%global _description \
27867d
iniparse is an INI parser for Python which is API compatible\
27867d
with the standard library's ConfigParser, preserves structure of INI\
27867d
files (order of sections & options, indentation, comments, and blank\
27867d
lines are preserved when data is updated), and is more convenient to\
Tim Lauridsen 8f7cb9
use.
Tim Lauridsen 8f7cb9
27867d
%description %{_description}
27867d
874e4f
%package -n python2-%{modname}
874e4f
Summary:        Python 2 Module for Accessing and Modifying Configuration Data in INI files
874e4f
%{?python_provide:%python_provide python2-%{modname}}
874e4f
BuildRequires:  python2-devel
945066
BuildRequires:  python2-setuptools
874e4f
BuildRequires:  python2-six
bbb5f6
BuildRequires:  python2-test
874e4f
Requires:       python2-six
874e4f
27867d
%description -n python2-%{modname} %{_description}
27867d
27867d
Python 2 version.
874e4f
874e4f
%package -n python3-%{modname}
27867d
Summary:        %{summary}
874e4f
%{?python_provide:%python_provide python3-%{modname}}
874e4f
BuildRequires:  python3-devel
945066
BuildRequires:  python3-setuptools
874e4f
BuildRequires:  python3-six
874e4f
BuildRequires:  python3-test
Tim Lauridsen 22ba08
Requires:       python3-six
d2b36b
Obsoletes:      platform-python-%{modname} < %{version}-%{release}
Tim Lauridsen 22ba08
27867d
%description -n python3-%{modname} %{_description}
27867d
27867d
Python 3 version.
Tim Lauridsen 22ba08
Tim Lauridsen 8f7cb9
%prep
874e4f
%setup -q -n %{modname}-%{version}
Tim Lauridsen e42247
%patch0 -p1
Tim Lauridsen 22ba08
%patch1 -p0
945066
%patch2 -p0
874e4f
chmod -c -x html/index.html
Tim Lauridsen 22ba08
Tim Lauridsen 8f7cb9
%build
874e4f
%py2_build
874e4f
%if %{with python3}
874e4f
%py3_build
Tim Lauridsen 22ba08
%endif
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%install
874e4f
%py2_install
874e4f
%py3_install
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
874e4f
%files -n python2-%{modname}
4012c5
%license LICENSE LICENSE-PSF
874e4f
%doc README Changelog html/
874e4f
%{python2_sitelib}/%{modname}/
874e4f
%{python2_sitelib}/%{modname}-%{version}-*.egg-info
Tim Lauridsen 8f7cb9
874e4f
%files -n python3-%{modname}
4012c5
%license LICENSE LICENSE-PSF
874e4f
%doc README Changelog html/
874e4f
%{python3_sitelib}/%{modname}/
874e4f
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
Tim Lauridsen 8f7cb9
Tim Lauridsen 8f7cb9
%changelog
e67194
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-33
e67194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e67194
052682
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-32
052682
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
052682
dc8332
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4-31
dc8332
- Rebuilt for Python 3.7
dc8332
b05bed
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-30
b05bed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b05bed
bbb5f6
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 0.4-29
bbb5f6
- Fix ambiguous Python 2 dependency declarations
bbb5f6
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
bbb5f6
d2b36b
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-28
d2b36b
- Use better Obsoletes for platform-python
d2b36b
ab66f7
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-27
ab66f7
- Remove platform-python subpackage
ab66f7
f81b0b
* Thu Aug 10 2017 Miro Hrončok <mhroncok@redhat.com> - 0.4-26
f81b0b
- Add platform-python package
f81b0b
- Add bconds
f81b0b
- Remove %%{?system_python_abi}
f81b0b
0cfa8a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-25
0cfa8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0cfa8a
711272
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-24
711272
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
711272
945066
* Sun Dec 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.4-23
945066
- Add patch to update setup.py to use setuptools and declare install dependencies
945066
3ae33d
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22
3ae33d
- Rebuild for Python 3.6
3ae33d
27867d
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-21
27867d
- Cleanups
27867d
- Add %%{?system_python_abi}
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
874e4f
* Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.4-19
874e4f
- Make python3 builds conditionally
874e4f
- Adopt to new packaging guidelines
874e4f
- Remove setuptools from BRs as it's not needed
874e4f
- Cleanup spec
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
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
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.