diff --git a/ply-3.11.tar.gz b/ply-3.11.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5fbe6277d906c2cda16360a0fab9586f09e71649 Binary files /dev/null and b/ply-3.11.tar.gz differ diff --git a/python-ply.spec b/python-ply.spec new file mode 100644 index 0000000000000000000000000000000000000000..cfb48ca0288368c075e361830e81ef90e8450cc5 --- /dev/null +++ b/python-ply.spec @@ -0,0 +1,85 @@ +%define anolis_release 1 +%global modname ply + +%bcond_without tests + +Name: python-%{modname} +Summary: Python Lex-Yacc +Version: 3.11 +Release: %{anolis_release}%{dist} +License: BSD +URL: http://www.dabeaz.com/ply/ +Source0: http://www.dabeaz.com/ply/%{modname}-%{version}.tar.gz + +BuildArch: noarch + +%description +PLY is a straightforward lex/yacc implementation. 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. + +%package -n python3-%{modname} +Summary: Python Lex-Yacc +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{modname} +PLY is a straightforward lex/yacc implementation. 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. + +Python 3 version. + +%prep +%setup -n %{modname}-%{version} +find example/ -type f -executable -exec chmod -x {} ';' +find example/ -type f -name '*.py' -exec sed -i \ + -e '1{\@^#!/usr/bin/env python@d}' -e '1{\@^#!/usr/local/bin/python@d}' \ + {} ';' +rm -rf *.egg-info +# extract license block from beginning of README.md +grep -B1000 "POSSIBILITY OF SUCH DAMAGE" README.md > LICENSE + +%build +%py3_build + +%install +%py3_install + +%if %{with tests} +%check +pushd test + ./cleanup.sh + %{__python3} testlex.py + %{__python3} testyacc.py +popd +%endif + +%files -n python3-%{modname} +%doc CHANGES README.md +%license LICENSE +%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{modname}-%{version}-*.egg-info/ + +%changelog +* Tue Apr 19 2022 Zhongling He 3.11-1 +- Init package from upstream v3.11