# # spec file for package python-ply # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define mod_name ply Name: python-%{mod_name} Version: 3.4 Release: 1 Url: http://www.dabeaz.com/ply/ Summary: Python Lex & Yacc License: BSD3c Group: Development/Languages/Python Source: %{mod_name}-%{version}.tar.gz Patch0: python-ply-shebangs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel %if 0%{?suse_version} %py_requires %endif %if 0%{?suse_version} > 1110 || 0%{?fedora} > 12 || 0%{?mdkversion} BuildArch: noarch %endif %description PLY is yet another implementation of lex and yacc for Python. Some notable features include the fact that its implemented entirely in Python and it uses LALR(1) parsing which is 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 extremely easy to use and provides very extensive error checking. It is compatible with both Python 2 and Python 3. %package doc License: LGPLv2.1+ Group: Development/Languages/Python Summary: Python Lex & Yacc Requires: %{name} = %{version} %description doc PLY is yet another implementation of lex and yacc for Python. Some notable features include the fact that its implemented entirely in Python and it uses LALR(1) parsing which is 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 extremely easy to use and provides very extensive error checking. It is compatible with both Python 2 and Python 3. %prep %setup -q -n %{mod_name}-%{version} %patch0 -p1 %build export CFLAGS="%{optflags}" python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} chmod a-x test/* %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc ANNOUNCE CHANGES README TODO %python_sitelib/%{mod_name}* %files doc %defattr(-,root,root,-) %doc doc example test %changelog