2019-09-30 11:15:20 -04:00
|
|
|
%global modname ply
|
|
|
|
|
%bcond_without python3
|
|
|
|
|
%global _description \
|
|
|
|
|
PLY is an implementation of lex and yacc parsing tools for Python.\
|
|
|
|
|
Here is a list of its essential features:\
|
|
|
|
|
* It is implemented entirely in Python.\
|
|
|
|
|
* It uses LR-parsing which is reasonably efficient and well suited for larger\
|
|
|
|
|
grammars.\
|
|
|
|
|
* PLY provides most of the standard lex/yacc features including support\
|
|
|
|
|
for empty productions, precedence rules, error recovery, and support\
|
|
|
|
|
for ambiguous grammars.\
|
|
|
|
|
* PLY is straightforward to use and provides very extensive error checking.\
|
|
|
|
|
* PLY doesn't try to do anything more or less than provide the basic lex/yacc\
|
|
|
|
|
functionality. In other words, it's not a large parsing framework or a\
|
|
|
|
|
component of some larger system.
|
|
|
|
|
|
|
|
|
|
Name: python-%{modname}
|
|
|
|
|
Summary: Python Lex-Yacc
|
2020-07-24 19:54:10 +08:00
|
|
|
Version: 3.11
|
2022-10-26 12:36:23 +00:00
|
|
|
Release: 3
|
2019-09-30 11:15:20 -04:00
|
|
|
License: BSD
|
|
|
|
|
URL: http://www.dabeaz.com/ply/
|
|
|
|
|
Source0: http://www.dabeaz.com/ply/%{modname}-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{modname}
|
|
|
|
|
Summary: Python Lex-Yacc
|
|
|
|
|
%{?python_provide:%python_provide python3-%{modname}}
|
|
|
|
|
BuildRequires: python3-devel python3-setuptools
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{modname} %{_description}
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-10-30 16:41:14 +08:00
|
|
|
%autosetup -n %{modname}-%{version}
|
|
|
|
|
find example/ -type f -exec chmod -x {} ';'
|
|
|
|
|
find example/ -type f -name '*.py' -exec sed -i \
|
2019-09-30 11:15:20 -04:00
|
|
|
-e '1{\@^#!/usr/bin/env python@d}' -e '1{\@^#!/usr/local/bin/python@d}' \
|
|
|
|
|
{} ';'
|
2020-10-30 16:41:14 +08:00
|
|
|
rm -rf *.egg-info
|
2019-09-30 11:15:20 -04:00
|
|
|
|
|
|
|
|
%build
|
2020-10-30 16:41:14 +08:00
|
|
|
%py3_build
|
2019-09-30 11:15:20 -04:00
|
|
|
|
|
|
|
|
%install
|
2020-10-30 16:41:14 +08:00
|
|
|
%py3_install
|
2019-09-30 11:15:20 -04:00
|
|
|
|
|
|
|
|
%check
|
2020-10-30 16:41:14 +08:00
|
|
|
pushd test
|
2019-09-30 11:15:20 -04:00
|
|
|
./cleanup.sh
|
|
|
|
|
%{__python3} testlex.py
|
|
|
|
|
%{__python3} testyacc.py
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{modname}
|
|
|
|
|
%{python3_sitelib}/%{modname}/
|
|
|
|
|
%{python3_sitelib}/%{modname}-%{version}-*.egg-info/
|
|
|
|
|
|
|
|
|
|
%files help
|
2020-10-30 16:41:14 +08:00
|
|
|
%doc CHANGES
|
2019-09-30 11:15:20 -04:00
|
|
|
|
|
|
|
|
%changelog
|
2022-10-26 12:36:23 +00:00
|
|
|
* Wed Oct 26 2022 zhuofeng <zhuofeng2@hhuawei.com> - 3.11-3
|
|
|
|
|
- Type:bufix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fix bad date in changelog
|
|
|
|
|
|
2020-10-30 16:41:14 +08:00
|
|
|
* Fri Oct 30 2020 wuchaochao <wuchaochao4@huawei.com> - 3.11-2
|
|
|
|
|
- Type:bufix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:remove python2
|
|
|
|
|
|
2022-10-26 12:36:23 +00:00
|
|
|
* Fri Jul 24 2020 tianwei <tianwei12@huawei.com> - 3.11-1
|
2020-07-24 19:54:10 +08:00
|
|
|
- update 3.11
|
|
|
|
|
|
2022-10-26 12:36:23 +00:00
|
|
|
* Sat Jun 20 2020 hanhui <hanhui15@huawei.com> - 3.10-1
|
2020-06-20 17:52:00 +08:00
|
|
|
- update 3.10
|
|
|
|
|
|
2019-09-30 11:15:20 -04:00
|
|
|
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.9-9
|
|
|
|
|
- Package init
|