|
Tim Lauridsen |
22ba088 |
%global with_python3 1
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
8f7cb94 |
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
1b7eda0 |
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
Name: python-iniparse
|
|
Tim Lauridsen |
89d6038 |
Version: 0.4
|
|
|
67e8325 |
Release: 13%{?dist}
|
|
Tim Lauridsen |
8f7cb94 |
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
|
|
Tim Lauridsen |
8f7cb94 |
Group: Development/Libraries
|
|
Tim Lauridsen |
8f7cb94 |
License: MIT
|
|
Tim Lauridsen |
8f7cb94 |
URL: http://code.google.com/p/iniparse/
|
|
Tim Lauridsen |
8f7cb94 |
Source0: http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz
|
|
Tim Lauridsen |
e422470 |
Patch0: fix-issue-28.patch
|
|
Tim Lauridsen |
22ba088 |
# The patch upstream (http://code.google.com/p/iniparse/issues/detail?id=22)
|
|
Tim Lauridsen |
22ba088 |
# is Python3-only. The patch below uses python-six to create a version that works
|
|
Tim Lauridsen |
22ba088 |
# with both Python major versions and is more error-prone.
|
|
Tim Lauridsen |
22ba088 |
Patch1: %{name}-python3-compat.patch
|
|
Tim Lauridsen |
8f7cb94 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python-setuptools
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python-six
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python2-devel
|
|
Tim Lauridsen |
6cfa2e3 |
BuildRequires: python-test
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
Requires: python-six
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python3-setuptools
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python3-six
|
|
Tim Lauridsen |
22ba088 |
BuildRequires: python3-devel
|
|
Tim Lauridsen |
4a4c548 |
BuildRequires: python3-test
|
|
Tim Lauridsen |
1a8b9ea |
%endif
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
BuildArch: noarch
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
%description
|
|
Tim Lauridsen |
8f7cb94 |
iniparse is an INI parser for Python which is API compatible
|
|
Tim Lauridsen |
8f7cb94 |
with the standard library's ConfigParser, preserves structure of INI
|
|
Tim Lauridsen |
8f7cb94 |
files (order of sections & options, indentation, comments, and blank
|
|
Tim Lauridsen |
8f7cb94 |
lines are preserved when data is updated), and is more convenient to
|
|
Tim Lauridsen |
8f7cb94 |
use.
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
%package -n python3-iniparse
|
|
Tim Lauridsen |
22ba088 |
Summary: Python 3 Module for Accessing and Modifying Configuration Data in INI files
|
|
Tim Lauridsen |
22ba088 |
Group: Development/Libraries
|
|
Tim Lauridsen |
22ba088 |
Requires: python3-six
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
%description -n python3-iniparse
|
|
Tim Lauridsen |
22ba088 |
iniparse is an INI parser for Python 3 which is API compatible
|
|
Tim Lauridsen |
22ba088 |
with the standard library's configparser, preserves structure of INI
|
|
Tim Lauridsen |
22ba088 |
files (order of sections & options, indentation, comments, and blank
|
|
Tim Lauridsen |
22ba088 |
lines are preserved when data is updated), and is more convenient to
|
|
Tim Lauridsen |
22ba088 |
use.
|
|
Tim Lauridsen |
22ba088 |
%endif
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
8f7cb94 |
%prep
|
|
Tim Lauridsen |
8f7cb94 |
%setup -q -n iniparse-%{version}
|
|
Tim Lauridsen |
e422470 |
%patch0 -p1
|
|
Tim Lauridsen |
22ba088 |
%patch1 -p0
|
|
|
1b7eda0 |
chmod -c -x html/index.html
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
rm -rf %{py3dir}
|
|
Tim Lauridsen |
22ba088 |
cp -a . %{py3dir}
|
|
Tim Lauridsen |
22ba088 |
%endif
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
8f7cb94 |
%build
|
|
Tim Lauridsen |
22ba088 |
%{__python2} setup.py build
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
pushd %{py3dir}
|
|
Tim Lauridsen |
22ba088 |
%{__python3} setup.py build
|
|
Tim Lauridsen |
22ba088 |
popd
|
|
Tim Lauridsen |
22ba088 |
%endif
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
%install
|
|
Tim Lauridsen |
8f7cb94 |
rm -rf $RPM_BUILD_ROOT
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
pushd %{py3dir}
|
|
Tim Lauridsen |
22ba088 |
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
Tim Lauridsen |
22ba088 |
mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT/%{_docdir}/python3-iniparse
|
|
Tim Lauridsen |
22ba088 |
popd
|
|
Tim Lauridsen |
22ba088 |
%endif
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
22ba088 |
|
|
Tim Lauridsen |
8f7cb94 |
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
1b7eda0 |
mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT%{_pkgdocdir}
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
%clean
|
|
Tim Lauridsen |
8f7cb94 |
rm -rf $RPM_BUILD_ROOT
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
61f3759 |
%check
|
|
Tim Lauridsen |
61f3759 |
%{__python2} runtests.py
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
4a4c548 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
4a4c548 |
pushd %{py3dir}
|
|
Tim Lauridsen |
4a4c548 |
%{__python3} runtests.py
|
|
Tim Lauridsen |
4a4c548 |
popd
|
|
Tim Lauridsen |
4a4c548 |
%endif
|
|
Tim Lauridsen |
4a4c548 |
|
|
Tim Lauridsen |
8f7cb94 |
%files
|
|
Tim Lauridsen |
8f7cb94 |
%defattr(-,root,root,-)
|
|
|
1b7eda0 |
%doc %{_pkgdocdir}
|
|
Tim Lauridsen |
f2700aa |
%{python_sitelib}/*
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
22ba088 |
%if 0%{?with_python3}
|
|
Tim Lauridsen |
22ba088 |
%files -n python3-iniparse
|
|
Tim Lauridsen |
22ba088 |
%defattr(-,root,root,-)
|
|
Tim Lauridsen |
22ba088 |
%doc %{_docdir}/python3-iniparse
|
|
Tim Lauridsen |
22ba088 |
%{python3_sitelib}/*
|
|
Tim Lauridsen |
22ba088 |
%endif
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
|
|
Tim Lauridsen |
8f7cb94 |
%changelog
|
|
|
67e8325 |
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-13
|
|
|
67e8325 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
67e8325 |
|
|
Tim Lauridsen |
4a4c548 |
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-12
|
|
Tim Lauridsen |
4a4c548 |
- added python3-test to buildreq for python3
|
|
Tim Lauridsen |
4a4c548 |
- run unittest with python3 also
|
|
Tim Lauridsen |
4a4c548 |
|
|
Tim Lauridsen |
6cfa2e3 |
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-11
|
|
Tim Lauridsen |
6cfa2e3 |
- added python-test to buildreq, for unittests
|
|
Tim Lauridsen |
6cfa2e3 |
|
|
Tim Lauridsen |
61f3759 |
* Fri Mar 07 2014 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-10
|
|
Tim Lauridsen |
61f3759 |
- added %%check to run unittests when build
|
|
Tim Lauridsen |
61f3759 |
- updated fix-issue-28.patch, so test cases dont fail
|
|
Tim Lauridsen |
61f3759 |
|
|
Tim Lauridsen |
22ba088 |
* Fri Sep 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-9
|
|
Tim Lauridsen |
22ba088 |
- Introduce python3 subpackage.
|
|
Tim Lauridsen |
22ba088 |
- Use %%__python2 instead of %%__python.
|
|
Tim Lauridsen |
22ba088 |
|
|
|
1b7eda0 |
* Mon Jul 29 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.4-8
|
|
|
1b7eda0 |
- Install docs to %%{_pkgdocdir} where available.
|
|
|
1b7eda0 |
|
|
|
f359002 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-7
|
|
|
f359002 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
f359002 |
|
|
Tim Lauridsen |
e422470 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-6
|
|
Tim Lauridsen |
e422470 |
- fix for upstream issue 28
|
|
Tim Lauridsen |
e422470 |
|
|
|
0d84ad5 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
|
|
|
0d84ad5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
0d84ad5 |
|
|
|
ad1b398 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-4
|
|
|
ad1b398 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
ad1b398 |
|
|
|
7d02322 |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
|
|
|
7d02322 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
7d02322 |
|
|
|
452cb30 |
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4-2
|
|
|
452cb30 |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
452cb30 |
|
|
Tim Lauridsen |
57f8c87 |
|
|
Tim Lauridsen |
89d6038 |
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.4-1
|
|
Tim Lauridsen |
89d6038 |
- Release 0.4
|
|
Tim Lauridsen |
89d6038 |
|
|
Tim Lauridsen |
57f8c87 |
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-2
|
|
Tim Lauridsen |
57f8c87 |
- removed patch
|
|
Tim Lauridsen |
57f8c87 |
|
|
Tim Lauridsen |
29eb7e3 |
* Sat Nov 7 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.1-1
|
|
Tim Lauridsen |
29eb7e3 |
- Release 0.3.1
|
|
Tim Lauridsen |
29eb7e3 |
- Fix empty-line handling bugs introduced in 0.3.0
|
|
Tim Lauridsen |
29eb7e3 |
|
|
|
f9693a7 |
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
|
|
|
f9693a7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
f9693a7 |
|
|
Tim Lauridsen |
d8498c1 |
* Mon Mar 2 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-2
|
|
Tim Lauridsen |
d8498c1 |
- added patch from upstream to fix regrestion :
|
|
Tim Lauridsen |
d8498c1 |
|
|
Tim Lauridsen |
4d36bad |
* Sat Feb 28 2009 Tim Lauridsen <timlau@fedoraproject.org> - 0.3.0-1
|
|
Tim Lauridsen |
4d36bad |
- Release 0.3.0
|
|
Tim Lauridsen |
4d36bad |
- Fix handling of continuation lines
|
|
Tim Lauridsen |
4d36bad |
- Fix DEFAULT handling
|
|
Tim Lauridsen |
4d36bad |
- Fix picking/unpickling
|
|
Tim Lauridsen |
4d36bad |
|
|
|
a66d8dc |
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.4-2
|
|
|
a66d8dc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
a66d8dc |
|
|
Tim Lauridsen |
cff60a9 |
* Sun Dec 7 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.4-1
|
|
Tim Lauridsen |
cff60a9 |
- Release 0.2.4:
|
|
Tim Lauridsen |
cff60a9 |
- Updated to work with Python-2.6 (Python-2.4 and 2.5 are still supported)
|
|
Tim Lauridsen |
cff60a9 |
- Support for files opened in unicode mode
|
|
Tim Lauridsen |
cff60a9 |
- Fixed Python-3.0 compatibility warnings
|
|
Tim Lauridsen |
cff60a9 |
- Minor API cleanup
|
|
|
b6031df |
* Fri Nov 28 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.3-5
|
|
|
b6031df |
- Rebuild for Python 2.6
|
|
Tim Lauridsen |
a7e9389 |
* Tue Jan 8 2008 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-4
|
|
Tim Lauridsen |
a7e9389 |
- own the %%{_docdir}/python-iniparse-%{version} directory
|
|
Tim Lauridsen |
f2700aa |
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-3
|
|
Tim Lauridsen |
f2700aa |
- handle egg-info too
|
|
Tim Lauridsen |
d74f2ae |
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-2
|
|
Tim Lauridsen |
d74f2ae |
- removed patch source line
|
|
Tim Lauridsen |
b4e0707 |
* Tue Dec 11 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.3-1
|
|
Tim Lauridsen |
b4e0707 |
- Updates to release 0.2.3
|
|
Tim Lauridsen |
b4e0707 |
- removed empty ini file patch, it is included in 0.2.3
|
|
Tim Lauridsen |
048ab31 |
* Mon Nov 19 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-2
|
|
Tim Lauridsen |
048ab31 |
- Added upstream patch to fix problems with empty ini files.
|
|
Tim Lauridsen |
8553569 |
* Tue Sep 25 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.2-1
|
|
Tim Lauridsen |
8553569 |
- Updated to release 0.2.2
|
|
Tim Lauridsen |
8553569 |
- removed patch to to fix problems with out commented lines, included in upstream source
|
|
Tim Lauridsen |
1a8b9ea |
* Wed Sep 12 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-4
|
|
Tim Lauridsen |
1a8b9ea |
- Added some logic to get the right python-setuptools buildrequeres
|
|
Tim Lauridsen |
1a8b9ea |
- based on the fedora version, to make the same spec file useful in
|
|
Tim Lauridsen |
1a8b9ea |
- all fedora releases.
|
|
Tim Lauridsen |
ddc9e82 |
* Mon Sep 10 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-3
|
|
Tim Lauridsen |
ddc9e82 |
- Added patch from upstream svn to fix problems with out commented lines.
|
|
Tim Lauridsen |
7decabd |
* Tue Aug 28 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2.1-2
|
|
Tim Lauridsen |
7decabd |
- Changed BuildRequires python-setuptools to python-setuptools-devel
|
|
Tim Lauridsen |
8e3e66b |
* Tue Aug 7 2007 Paramjit Oberoi <param@cs.wisc.edu> - 0.2.1-1
|
|
Tim Lauridsen |
8e3e66b |
- Release 0.2.1
|
|
Tim Lauridsen |
8f7cb94 |
* Fri Jul 27 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-3
|
|
Tim Lauridsen |
8f7cb94 |
- relocated doc to %{_docdir}/python-iniparse-%{version}
|
|
Tim Lauridsen |
8f7cb94 |
* Thu Jul 26 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-2
|
|
Tim Lauridsen |
8f7cb94 |
- changed name from iniparse to python-iniparse
|
|
Tim Lauridsen |
8f7cb94 |
* Tue Jul 17 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.2-1
|
|
Tim Lauridsen |
8f7cb94 |
- Release 0.2
|
|
Tim Lauridsen |
8f7cb94 |
- Added html/* to %%doc
|
|
Tim Lauridsen |
8f7cb94 |
* Fri Jul 13 2007 Tim Lauridsen <timlau@fedoraproject.org> - 0.1-1
|
|
Tim Lauridsen |
8f7cb94 |
- Initial build.
|