%global modname ply
Name: python3-%{modname}
Summary: Python Lex-Yacc
Version: 3.9
Release: 1%{?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.
functionality. In other words, it's not a large parsing framework or a
component of some larger system.
%package -n python%{python3_pkgversion}-%{modname}
Summary: Python Lex-Yacc
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%description -n python%{python3_pkgversion}-%{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 %{python3_version} version.
%prep
%autosetup -n %{modname}-%{version}
find example/ -type f -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
%build
%py3_build
%install
%py3_install
%check
cd test
./cleanup.sh
%{__python3} testlex.py
%{__python3} testyacc.py
%files -n python%{python3_pkgversion}-%{modname}
%doc CHANGES README.md
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*.egg-info/
%changelog
* Tue Nov 8 2016 Orion Poplawski <orion@cora.nwra.com> - 3.9-1
- Update to 3.9
* Wed Oct 12 2016 Orion Poplawski <orion@cora.nwra.com> - 3.8-1
- Initial EPEL version