commit b18ca532fdeb44fa459b925b12897bd098b8ea878c78ad5011720b82711ba6db Author: Denisart Benjamin Date: Fri Mar 14 13:50:29 2014 +0000 Accepting request 225913 from home:Nijel:branches:devel:languages:python Please include new package OBS-URL: https://build.opensuse.org/request/show/225913 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-funcparserlib?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/funcparserlib-0.3.6.tar.gz b/funcparserlib-0.3.6.tar.gz new file mode 100644 index 0000000..4b6c2ff --- /dev/null +++ b/funcparserlib-0.3.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7992eac1a3eb97b3d91faa342bfda0729e990bd8a43774c1592c091e563c91d +size 30401 diff --git a/python-funcparserlib.changes b/python-funcparserlib.changes new file mode 100644 index 0000000..4bba37d --- /dev/null +++ b/python-funcparserlib.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Thu Oct 31 14:45:17 UTC 2013 - mcihar@suse.cz + +- Initial packaging + diff --git a/python-funcparserlib.spec b/python-funcparserlib.spec new file mode 100644 index 0000000..19012b5 --- /dev/null +++ b/python-funcparserlib.spec @@ -0,0 +1,75 @@ +# +# spec file for package python-funcparserlib +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: python-funcparserlib +Version: 0.3.6 +Release: 0 +Url: http://code.google.com/p/funcparserlib/ +Summary: Recursive descent parsing library based on functional combinators +License: MIT +Group: Development/Languages/Python +Source: http://pypi.python.org/packages/source/f/funcparserlib/funcparserlib-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: python-nose +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +Parser combinators are just higher-order functions that take parsers as +their arguments and return them as result values. Parser combinators are: + +First-class values. Extremely composable. Tend to make the code quite compact. +Resemble the readable notation of xBNF grammars. + +Parsers made with funcparserlib are pure-Python LL(*) parsers. It means that +it's very easy to write them without thinking about look-aheads and all that +hardcore parsing stuff. But the recursive descent parsing is a rather slow +method compared to LL(k) or LR(k) algorithms. + +So the primary domain for funcparserlib is parsing little languages or external +DSLs (domain specific languages). + +The library itself is very small. Its source code is only 0.5 KLOC, with lots +of comments included. It features the longest parsed prefix error reporting, +as well as a tiny lexer generator for token position tracking. + +%prep +%setup -q -n funcparserlib-%{version} + +%build +python setup.py build + +%install +python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%check +# Python 2.6.0 has broken exceptions for tests +%if %(python -c 'import sys; print int(sys.version.startswith("2.6 "))') == 0 +nosetests +%endif + +%files +%defattr(-,root,root,-) +%{python_sitelib}/* + +%changelog