8e5f44c
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
8e5f44c
8e5f44c
Name:			python-ply
8e5f44c
Summary: 		Python Lex-Yacc
ea1b9d9
Version:		3.2
fd89579
Release:		2%{?dist}
ea1b9d9
License:		BSD
8e5f44c
Group:			System Environment/Libraries
8e5f44c
URL:			http://www.dabeaz.com/ply/
8e5f44c
Source0:		http://www.dabeaz.com/ply/ply-%{version}.tar.gz
8e5f44c
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8e5f44c
BuildArch:		noarch
8e5f44c
BuildRequires:		python-devel
8e5f44c
8e5f44c
%description
8e5f44c
PLY is a straightforward lex/yacc implementation. Here is a list of its 
8e5f44c
essential features:
8e5f44c
* It is implemented entirely in Python.
8e5f44c
* It uses LR-parsing which is reasonably efficient and well suited for larger 
8e5f44c
  grammars.
8e5f44c
* PLY provides most of the standard lex/yacc features including support 
8e5f44c
  for empty productions, precedence rules, error recovery, and support 
8e5f44c
  for ambiguous grammars.
8e5f44c
* PLY is straightforward to use and provides very extensive error checking.
8e5f44c
* PLY doesn't try to do anything more or less than provide the basic lex/yacc 
8e5f44c
  functionality. In other words, it's not a large parsing framework or a 
8e5f44c
  component of some larger system. 
8e5f44c
8e5f44c
%prep
8e5f44c
%setup -q -n ply-%{version}
8e5f44c
sed -i 's|/usr/local/bin/python|/usr/bin/python|g' example/yply/yply.py
8e5f44c
chmod -x example/yply/yply.py example/newclasscalc/calc.py example/classcalc/calc.py example/cleanup.sh
8e5f44c
8e5f44c
%build
8e5f44c
%{__python} setup.py build
8e5f44c
8e5f44c
%install
8e5f44c
rm -rf $RPM_BUILD_ROOT
8e5f44c
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
8e5f44c
8e5f44c
%clean
8e5f44c
rm -rf $RPM_BUILD_ROOT
8e5f44c
8e5f44c
%files
8e5f44c
%defattr(-,root,root,-)
ea1b9d9
%doc CHANGES README example/
8e5f44c
%{python_sitelib}/ply/
8e5f44c
%{python_sitelib}/ply*.egg-info
8e5f44c
8e5f44c
%changelog
fd89579
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-2
fd89579
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fd89579
ea1b9d9
* Wed Apr 22 2009 Tom "spot" Callaway <tcallawa@redhat.com> 3.2-1
ea1b9d9
- update to 3.2, license change to BSD
ea1b9d9
f2ca7de
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
f2ca7de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f2ca7de
04c75d7
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.5-2
04c75d7
- Rebuild for Python 2.6
04c75d7
e8a85b6
* Fri Oct 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.5-1
e8a85b6
- update to 2.5
e8a85b6
8e5f44c
* Mon Mar 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.2.3-2
8e5f44c
- add example dir as doc
8e5f44c
8e5f44c
* Sat Mar 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.2.3-1
8e5f44c
- Initial package for Fedora