diff --git a/.gitignore b/.gitignore index e69de29..bdee9ea 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/SimpleParse-2.1.1.tar.gz diff --git a/python-simpleparse-eols.patch b/python-simpleparse-eols.patch new file mode 100644 index 0000000..9fc1362 --- /dev/null +++ b/python-simpleparse-eols.patch @@ -0,0 +1,33 @@ +=== modified file 'examples/__init__.py' +--- examples/__init__.py 2008-11-09 22:58:29 +0000 ++++ examples/__init__.py 2011-08-17 18:31:28 +0000 +@@ -4,4 +4,4 @@ + well as a demonstration of using "pre-built" + parser nodes (particularly one based on the re + module). +-''' +\ No newline at end of file ++''' + +=== modified file 'examples/simpleexample2_2.py' +--- examples/simpleexample2_2.py 2008-11-09 22:58:29 +0000 ++++ examples/simpleexample2_2.py 2011-08-17 20:06:58 +0000 +@@ -34,4 +34,4 @@ + for testData in testEquality: + success, children, nextcharacter = parser.parse( testData, production=production) + assert success and nextcharacter==len(testData), """Wasn't able to parse %s as a %s (%s chars parsed of %s), returned value was %s"""%( repr(testData), production, nextcharacter, len(testData), (success, children, nextcharacter)) +- +\ No newline at end of file ++ + +=== modified file 'examples/vrml.py' +--- examples/vrml.py 2008-11-09 22:58:29 +0000 ++++ examples/vrml.py 2011-08-17 20:07:12 +0000 +@@ -57,4 +57,4 @@ + success, tags, next = parser.parse( data) + d = time.time()-t + print "parsed %s characters of %s in %s seconds (%scps)"%( next, len(data), d, next/(d or 0.000000001) ) +- +\ No newline at end of file ++ + diff --git a/python-simpleparse.spec b/python-simpleparse.spec new file mode 100644 index 0000000..e7164f9 --- /dev/null +++ b/python-simpleparse.spec @@ -0,0 +1,62 @@ +%global oname SimpleParse + +Name: python-simpleparse +License: BSD +Group: System Environment/Libraries +Summary: A simple and fast parser generator +Version: 2.1.1 +Release: 3%{?dist} +URL: http://launchpad.net/simpleparse +Source0: http://pypi.python.org/packages/source/S/SimpleParse/%{oname}-%{version}.tar.gz +Patch1: %{name}-eols.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python-devel + +%description +SimpleParse is a BSD-licensed Python package providing a simple and fast parser +generator using a modified version of the mxTextTools text-tagging engine. +SimpleParse allows you to generate parsers directly from your EBNF grammar. + + +# we don't want to provide mxTextTools.so +%{?filter_setup: +%filter_provides_in %{python_sitearch}/.*\.so$ +%filter_setup +} + +%prep +%setup -q -n %{oname}-%{version} +%patch1 -p0 + +%build +%{__python} setup.py build + +%install +rm -rf %{buildroot} +%{__python} setup.py install --skip-build --root %{buildroot} + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{python_sitearch} +%exclude %{python_sitearch}/simpleparse/tests +%exclude %{python_sitearch}/simpleparse/examples +%doc license.txt doc examples + +%changelog +* Wed Aug 17 2011 Andy Grover - 2.1.1-3 +- Add patch to fix some missing EOLs + +* Wed Aug 17 2011 Andy Grover - 2.1.1-2 +- Filter out mxtexttools.so provides + +* Tue Aug 16 2011 Andy Grover - 2.1.1-1 +- Update to latest upstream version +- Modify URL and Source +- Remove mx dependency + +* Tue May 10 2011 Andy Grover - 2.0.0-1 +- Initial packaging diff --git a/sources b/sources index e69de29..25c7223 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d67aaceca86acc763d6eebee919cc8aa SimpleParse-2.1.1.tar.gz