|
@@ -1,21 +1,22 @@
|
|
|
-%define ver 0.3.5
|
|
|
-%define rel 3
|
|
|
-
|
|
|
Summary: Recursive descent parsing library for Python based on functional combinators
|
|
|
Name: python-funcparserlib
|
|
|
-Version: %{ver}
|
|
|
-Release: %{rel}%{?_dist_release}
|
|
|
-License: MIT License
|
|
|
+Version: 0.3.6
|
|
|
+Release: 1%{?_dist_release}
|
|
|
Group: Development/Libraries
|
|
|
-URL: http://code.google.com/p/funcparserlib/
|
|
|
-Source0:http://pypi.python.org/packages/source/f/funcparserlib/funcparserlib-%{version}.tar.gz
|
|
|
+
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+
|
|
|
+License: MIT License
|
|
|
+URL: https://pypi.org/project/funcparserlib/
|
|
|
+Source0:https://pypi.python.org/packages/source/f/funcparserlib/funcparserlib-%{version}.tar.gz
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|
|
BuildArch: noarch
|
|
|
BuildRequires: python-devel
|
|
|
+BuildRequires: python-setuptools
|
|
|
+BuildRequires: python-rpm-macros
|
|
|
Requires: python
|
|
|
|
|
|
-Vendor: Project Vine
|
|
|
-Distribution: Vine Linux
|
|
|
|
|
|
%description
|
|
|
Parser combinators are just higher-order functions that take parsers as
|
|
@@ -34,26 +35,69 @@ 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).
|
|
|
|
|
|
+
|
|
|
+%package -n python3-funcparserlib
|
|
|
+Summary: Recursive descent parsing library for Python based on functional combinators
|
|
|
+BuildRequires: python3-devel
|
|
|
+BuildRequires: python3-setuptools
|
|
|
+BuildRequires: python3-rpm-macros
|
|
|
+Requires: python3
|
|
|
+
|
|
|
+%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).
|
|
|
+
|
|
|
+
|
|
|
%prep
|
|
|
-%setup -q -n funcparserlib-%{ver}
|
|
|
+%setup -q -n funcparserlib-%{version}
|
|
|
|
|
|
%build
|
|
|
-%__python setup.py build
|
|
|
+%py_build
|
|
|
+%py3_build
|
|
|
|
|
|
%install
|
|
|
%__rm -rf %{buildroot}
|
|
|
-%__python setup.py install --skip-build --root %{buildroot}
|
|
|
+%py_install
|
|
|
+%py3_install
|
|
|
+
|
|
|
+sed -i \
|
|
|
+ -e 's/except NoParseError, e:/except NoParseError as e:/' \
|
|
|
+ %{buildroot}%{python3_sitelib}/funcparserlib/parser.py
|
|
|
|
|
|
%clean
|
|
|
%__rm -rf %{buildroot}
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc CHANGES LICENSE README doc examples
|
|
|
-%{python_sitelib}/funcparserlib-%{ver}-py*.egg-info
|
|
|
+%license LICENSE
|
|
|
+%doc CHANGES README doc examples
|
|
|
+%{python_sitelib}/funcparserlib-%{version}-py*.egg-info
|
|
|
%{python_sitelib}/funcparserlib
|
|
|
|
|
|
+%files -n python3-funcparserlib
|
|
|
+%defattr(-,root,root,-)
|
|
|
+%license LICENSE
|
|
|
+%doc CHANGES README doc examples
|
|
|
+%{python3_sitelib}/funcparserlib*
|
|
|
+
|
|
|
%changelog
|
|
|
+* Thu Nov 21 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.3.6-1
|
|
|
+- new upstream release.
|
|
|
+- added python3 support.
|
|
|
+
|
|
|
* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.3.5-3
|
|
|
- rebuild with VineSeed environment
|
|
|
|