Add source and spec files

This commit is contained in:
joec88 2020-12-12 17:40:39 +08:00
parent 89aa8fa16d
commit 56d1d61f2a
2 changed files with 113 additions and 0 deletions

BIN
funcparserlib-0.3.6.tar.gz Normal file

Binary file not shown.

113
python-funcparserlib.spec Normal file
View File

@ -0,0 +1,113 @@
%global _empty_manifest_terminate_build 0
Name: python-funcparserlib
Version: 0.3.6
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/cb/f7/b4a59c3ccf67c0082546eaeb454da1a6610e924d2e7a2a21f337ecae7b40/funcparserlib-0.3.6.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-0.3.6
%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
* Mon Nov 23 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated