%global _empty_manifest_terminate_build 0 Name: python-funcparserlib Version: 1.0.0a0 Release: 1 Summary: Recursive descent parsing library based on functional combinators License: MIT URL: https://github.com/vlasovskikh/funcparserlib Source0: https://files.pythonhosted.org/packages/75/e2/a132f2b624a2bad2c3233afa7c8273ee192d0660b55dbcb22f68ff9de819/funcparserlib-1.0.0a0.tar.gz BuildArch: noarch %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. %package -n python3-funcparserlib Summary: Recursive descent parsing library based on functional combinators Provides: python-funcparserlib BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-funcparserlib *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. %package help Summary: Development documents and examples for funcparserlib Provides: python3-funcparserlib-doc %description help *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 %autosetup -n funcparserlib-%{version} %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-funcparserlib -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Feb 25 2022 huangtianhua - 1.0.0a0-1 - Upgrade to 1.0.0a0 to fix obs build error * Mon Nov 23 2020 Python_Bot - Package Spec generated