python-funcparserlib/python-funcparserlib.spec

120 lines
4.8 KiB
RPMSpec
Raw Normal View History

2020-12-12 17:40:39 +08:00
%global _empty_manifest_terminate_build 0
Name: python-funcparserlib
2022-12-08 14:37:02 +08:00
Version: 1.0.1
2020-12-12 17:40:39 +08:00
Release: 1
Summary: Recursive descent parsing library based on functional combinators
License: MIT
URL: https://github.com/vlasovskikh/funcparserlib
2022-12-08 14:37:02 +08:00
Source0: https://files.pythonhosted.org/packages/93/44/a21dfd9c45ad6909257e5186378a4fedaf41406824ce1ec06bc2a6c168e7/funcparserlib-1.0.1.tar.gz
2020-12-12 17:40:39 +08:00
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
2022-12-08 14:37:02 +08:00
Provides: python-funcparserlib = %{version}-%{release}
2020-12-12 17:40:39 +08:00
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}
2020-12-12 17:40:39 +08:00
%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
2022-12-08 14:37:02 +08:00
* Thu Dec 08 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.1-1
- Update package to version 1.0.1
* Fri Feb 25 2022 huangtianhua <huangtianhua@huawei.com> - 1.0.0a0-1
- Upgrade to 1.0.0a0 to fix obs build error
2020-12-12 17:40:39 +08:00
* Mon Nov 23 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated