%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-ply Summary: Python Lex-Yacc Version: 3.2 Release: 2%{?dist} License: BSD Group: System Environment/Libraries URL: http://www.dabeaz.com/ply/ Source0: http://www.dabeaz.com/ply/ply-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %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. %prep %setup -q -n ply-%{version} sed -i 's|/usr/local/bin/python|/usr/bin/python|g' example/yply/yply.py chmod -x example/yply/yply.py example/newclasscalc/calc.py example/classcalc/calc.py example/cleanup.sh %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGES README example/ %{python_sitelib}/ply/ %{python_sitelib}/ply*.egg-info %changelog * Sun Jul 26 2009 Fedora Release Engineering - 3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Apr 22 2009 Tom "spot" Callaway 3.2-1 - update to 3.2, license change to BSD * Thu Feb 26 2009 Fedora Release Engineering - 2.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 2.5-2 - Rebuild for Python 2.6 * Fri Oct 17 2008 Tom "spot" Callaway 2.5-1 - update to 2.5 * Mon Mar 24 2008 Tom "spot" Callaway 0.2.3-2 - add example dir as doc * Sat Mar 15 2008 Tom "spot" Callaway 0.2.3-1 - Initial package for Fedora