diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad5bd8c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/iniparse-0.4.tar.gz diff --git a/.python-iniparse.metadata b/.python-iniparse.metadata new file mode 100644 index 0000000..61a1a7d --- /dev/null +++ b/.python-iniparse.metadata @@ -0,0 +1 @@ +2b2af8a19f3e5c212c27d7c524cd748fa0b38650 SOURCES/iniparse-0.4.tar.gz diff --git a/SOURCES/fix-issue-28.patch b/SOURCES/fix-issue-28.patch new file mode 100644 index 0000000..510c194 --- /dev/null +++ b/SOURCES/fix-issue-28.patch @@ -0,0 +1,32 @@ +From 68843c1f3dd21a06aa2dc3637a4ffa40f6d572a8 Mon Sep 17 00:00:00 2001 +From: Tim Lauridsen +Date: Sun, 9 Sep 2012 16:10:17 +0200 +Subject: [PATCH] fix for option begining with rem is removed (upstream issue + #28) + +-- +diff --git a/iniparse/ini.py b/iniparse/ini.py +index 408354d..68dd65c 100644 +--- a/iniparse/ini.py ++++ b/iniparse/ini.py +@@ -171,7 +171,7 @@ def change_comment_syntax(comment_chars='%;#', allow_rem=False): + CommentLine.regex = re.compile(regex) + + class CommentLine(LineType): +- regex = re.compile(r'^(?P[;#]|[rR][eE][mM])' ++ regex = re.compile(r'^(?P[;#]|[rR][eE][mM] +)' + r'(?P.*)$') + + def __init__(self, comment='', separator='#', line=None): +--- a/tests/test_ini.py.orig 2013-07-31 13:16:19.944347042 +0200 ++++ b/tests/test_ini.py 2013-07-31 13:16:35.806330262 +0200 +@@ -145,7 +145,6 @@ + ';; this is also a comment', + '; so is this ', + 'Rem and this', +- 'remthis too!' + ] + def test_parsing(self): + for l in self.lines: +-- +1.7.11.4 diff --git a/SPECS/python-iniparse.spec b/SPECS/python-iniparse.spec new file mode 100644 index 0000000..bed5406 --- /dev/null +++ b/SPECS/python-iniparse.spec @@ -0,0 +1,147 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Name: python-iniparse +Version: 0.4 +Release: 9%{?dist} +Summary: Python Module for Accessing and Modifying Configuration Data in INI files +Group: Development/Libraries +License: MIT +URL: http://code.google.com/p/iniparse/ +Source0: http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz +Patch0: fix-issue-28.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%if 0%{?fedora} >= 8 +BuildRequires: python-setuptools-devel +%else +BuildRequires: python-setuptools +%endif + +BuildArch: noarch + +%description +iniparse is an INI parser for Python which is API compatible +with the standard library's ConfigParser, preserves structure of INI +files (order of sections & options, indentation, comments, and blank +lines are preserved when data is updated), and is more convenient to +use. + +%prep +%setup -q -n iniparse-%{version} +%patch0 -p1 + +%build +%{__python} setup.py build + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +# fixes +chmod 644 $RPM_BUILD_ROOT//usr/share/doc/iniparse-%{version}/index.html +mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT/usr/share/doc/python-iniparse-%{version} + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%dir %{_docdir}/python-iniparse-%{version} +%doc %{_docdir}/python-iniparse-%{version}/* +%{python_sitelib}/* + + + +%changelog +* Fri Dec 27 2013 Daniel Mach - 0.4-9 +- Mass rebuild 2013-12-27 + +* Wed Jul 31 2013 Bohuslav Kabrda - 0.4-8 +- fix tests not to fail because of fix for upstream issue 28 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 0.4-6 +- fix for upstream issue 28 + +* Sat Jul 21 2012 Fedora Release Engineering - 0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 22 2010 David Malcolm - 0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + + +* Sat Nov 7 2009 Tim Lauridsen - 0.4-1 +- Release 0.4 + +* Sat Nov 7 2009 Tim Lauridsen - 0.3.1-2 +- removed patch + +* Sat Nov 7 2009 Tim Lauridsen - 0.3.1-1 +- Release 0.3.1 +- Fix empty-line handling bugs introduced in 0.3.0 + +* Sun Jul 26 2009 Fedora Release Engineering - 0.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Mar 2 2009 Tim Lauridsen - 0.3.0-2 +- added patch from upstream to fix regrestion : + +* Sat Feb 28 2009 Tim Lauridsen - 0.3.0-1 +- Release 0.3.0 +- Fix handling of continuation lines +- Fix DEFAULT handling +- Fix picking/unpickling + +* Thu Feb 26 2009 Fedora Release Engineering - 0.2.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sun Dec 7 2008 Tim Lauridsen - 0.2.4-1 +- Release 0.2.4: +- Updated to work with Python-2.6 (Python-2.4 and 2.5 are still supported) +- Support for files opened in unicode mode +- Fixed Python-3.0 compatibility warnings +- Minor API cleanup +* Fri Nov 28 2008 Ignacio Vazquez-Abrams - 0.2.3-5 +- Rebuild for Python 2.6 +* Tue Jan 8 2008 Tim Lauridsen - 0.2.3-4 +- own the %%{_docdir}/python-iniparse-%{version} directory +* Tue Dec 11 2007 Tim Lauridsen - 0.2.3-3 +- handle egg-info too +* Tue Dec 11 2007 Tim Lauridsen - 0.2.3-2 +- removed patch source line +* Tue Dec 11 2007 Tim Lauridsen - 0.2.3-1 +- Updates to release 0.2.3 +- removed empty ini file patch, it is included in 0.2.3 +* Mon Nov 19 2007 Tim Lauridsen - 0.2.2-2 +- Added upstream patch to fix problems with empty ini files. +* Tue Sep 25 2007 Tim Lauridsen - 0.2.2-1 +- Updated to release 0.2.2 +- removed patch to to fix problems with out commented lines, included in upstream source +* Wed Sep 12 2007 Tim Lauridsen - 0.2.1-4 +- Added some logic to get the right python-setuptools buildrequeres +- based on the fedora version, to make the same spec file useful in +- all fedora releases. +* Mon Sep 10 2007 Tim Lauridsen - 0.2.1-3 +- Added patch from upstream svn to fix problems with out commented lines. +* Tue Aug 28 2007 Tim Lauridsen - 0.2.1-2 +- Changed BuildRequires python-setuptools to python-setuptools-devel +* Tue Aug 7 2007 Paramjit Oberoi - 0.2.1-1 +- Release 0.2.1 +* Fri Jul 27 2007 Tim Lauridsen - 0.2-3 +- relocated doc to %{_docdir}/python-iniparse-%{version} +* Thu Jul 26 2007 Tim Lauridsen - 0.2-2 +- changed name from iniparse to python-iniparse +* Tue Jul 17 2007 Tim Lauridsen - 0.2-1 +- Release 0.2 +- Added html/* to %%doc +* Fri Jul 13 2007 Tim Lauridsen - 0.1-1 +- Initial build.