rpms/python-ply/EL-6 python-ply.spec,1.6,1.7 sources,1.4,1.5

Tom Callaway spot at fedoraproject.org
Mon Jul 12 12:53:09 UTC 2010


Author: spot

Update of /cvs/pkgs/rpms/python-ply/EL-6
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11837

Modified Files:
	python-ply.spec sources 
Log Message:
disable python3 for now


Index: python-ply.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-ply/EL-6/python-ply.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- python-ply.spec	26 Jul 2009 20:51:27 -0000	1.6
+++ python-ply.spec	12 Jul 2010 12:53:09 -0000	1.7
@@ -1,9 +1,11 @@
+%global with_python3 0
+
 %{!?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}
+Version:		3.3
+Release:		2%{?dist}.1
 License:		BSD
 Group:			System Environment/Libraries
 URL:			http://www.dabeaz.com/ply/
@@ -12,6 +14,11 @@ BuildRoot:		%{_tmppath}/%{name}-%{versio
 BuildArch:		noarch
 BuildRequires:		python-devel
 
+%if 0%{?with_python3}
+BuildRequires:          /usr/bin/2to3
+BuildRequires:          python3-devel
+%endif # if with_python3
+
 %description
 PLY is a straightforward lex/yacc implementation. Here is a list of its 
 essential features:
@@ -26,18 +33,68 @@ essential features:
   functionality. In other words, it's not a large parsing framework or a 
   component of some larger system. 
 
+%if 0%{?with_python3}
+%package -n python3-ply
+Summary:        Python Lex-Yacc
+Group:          System Environment/Libraries
+Requires:       python3-setuptools
+
+%description -n python3-ply
+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.
+%endif # with_python3
+
 %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
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
+
+# The README states: "You should not convert PLY using
+# 2to3--it is not necessary and may in fact break the implementation."
+#
+# However, one of the example files contains python 2 "print" syntax, which
+# lead to syntax errors during byte-compilation
+#
+# So we fix this file with 2to3:
+pushd %{py3dir}
+  2to3 --write --nobackups ply/cpp.py
+popd
+%endif # with_python3
+
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif # with_python3
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -47,7 +104,24 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/ply/
 %{python_sitelib}/ply*.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-ply
+%defattr(-,root,root,-)
+%doc CHANGES README example/
+%{python3_sitelib}/ply/
+%{python3_sitelib}/ply*.egg-info
+%endif # with_python3
+
 %changelog
+* Mon Jul 12 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 3.3-2.1
+- disable python3 package in EL-6 for now
+
+* Sat Apr  3 2010 David Malcolm <dmalcolm at redhat.com> - 3.3-2
+- add python3-ply subpackage
+
+* Mon Oct 19 2009 Tom "spot" Callaway <tcallawa at redhat.com> - 3.3-1
+- update to 3.3
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/python-ply/EL-6/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- sources	22 Apr 2009 19:31:21 -0000	1.4
+++ sources	12 Jul 2010 12:53:09 -0000	1.5
@@ -1 +1 @@
-afc9dcfc3284e3a8269c97cc4802cb53  ply-3.2.tar.gz
+4a7f837f71a7c1ea6b5b0c57272909c7  ply-3.3.tar.gz



More information about the scm-commits mailing list