From 61f3759498917dc5c33a35589aa9461de8beedc3 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Fri, 7 Mar 2014 19:17:22 +0100 Subject: [PATCH] release 0.4-10 --- fix-issue-28.patch | 41 +++++++++++++++++++++-------------------- python-iniparse.spec | 8 +++++++- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/fix-issue-28.patch b/fix-issue-28.patch index 47832e3..ca6900a 100644 --- a/fix-issue-28.patch +++ b/fix-issue-28.patch @@ -1,26 +1,27 @@ -From 68843c1f3dd21a06aa2dc3637a4ffa40f6d572a8 Mon Sep 17 00:00:00 2001 +From b3d6ea5ed88b0e6cf9fdb411a14e725665ded92e 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) +Date: Fri, 7 Mar 2014 19:06:40 +0100 +Subject: [PATCH] Fix handling of REM xxxxxxxx as a comment, but REMXXXX is not + (upstream issue #28) --- - iniparse/ini.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_ini.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) -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): +diff --git a/tests/test_ini.py b/tests/test_ini.py +index 07d4f4e..6d974f0 100644 +--- a/tests/test_ini.py ++++ b/tests/test_ini.py +@@ -144,8 +144,7 @@ class test_comment_line(unittest.TestCase): + '#this is a comment', + ';; this is also a comment', + '; so is this ', +- 'Rem and this', +- 'remthis too!' ++ 'Rem and this' + ] + def test_parsing(self): + for l in self.lines: -- -1.7.11.4 +1.8.5.3 diff --git a/python-iniparse.spec b/python-iniparse.spec index 8da82eb..3c182dd 100644 --- a/python-iniparse.spec +++ b/python-iniparse.spec @@ -5,7 +5,7 @@ Name: python-iniparse Version: 0.4 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Python Module for Accessing and Modifying Configuration Data in INI files Group: Development/Libraries License: MIT @@ -90,6 +90,8 @@ mv $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version} $RPM_BUILD_ROOT%{_pkgdocdir %clean rm -rf $RPM_BUILD_ROOT +%check +%{__python2} runtests.py %files %defattr(-,root,root,-) @@ -105,6 +107,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Mar 07 2014 Tim Lauridsen - 0.4-10 +- added %%check to run unittests when build +- updated fix-issue-28.patch, so test cases dont fail + * Fri Sep 20 2013 Bohuslav Kabrda - 0.4-9 - Introduce python3 subpackage. - Use %%__python2 instead of %%__python.