From 265761ba9d6251acf8224a5bd5ba759e293ec4bd68f2eb54f55ec31726e9506d Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 25 May 2012 07:01:16 +0000 Subject: [PATCH] Accepting request 122221 from home:HighwayStar:branches:devel:languages:python python3 added OBS-URL: https://build.opensuse.org/request/show/122221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ply?expand=0&rev=12 --- python-ply.changes | 5 +++ python3-ply.changes | 5 +++ python3-ply.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 python3-ply.changes create mode 100644 python3-ply.spec diff --git a/python-ply.changes b/python-ply.changes index 40f5571..e4db16a 100644 --- a/python-ply.changes +++ b/python-ply.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 25 03:24:34 UTC 2012 - highwaystar.ru@gmail.com + +- python3 package added + ------------------------------------------------------------------- Mon Feb 13 10:54:05 UTC 2012 - coolo@suse.com diff --git a/python3-ply.changes b/python3-ply.changes new file mode 100644 index 0000000..a85da0b --- /dev/null +++ b/python3-ply.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri May 25 03:24:59 UTC 2012 - highwaystar.ru@gmail.com + +- python3 package added + diff --git a/python3-ply.spec b/python3-ply.spec new file mode 100644 index 0000000..f9b291e --- /dev/null +++ b/python3-ply.spec @@ -0,0 +1,101 @@ +# +# spec file for package python3-ply +# +# Copyright (c) 2012 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/ +# + + +%{!?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: python3-%{mod_name} +Version: 3.4 +Release: 0 +Url: http://www.dabeaz.com/ply/ +Summary: Python Lex & Yacc +License: BSD-3-Clause +Group: Development/Languages/Python +Source: %{mod_name}-%{version}.tar.gz +Patch0: python-ply-shebangs.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3-devel +%if 0%{?suse_version} && 0%{?suse_version} <= 1140 +%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)} +%endif +Requires: python(abi) = %{py3_ver} +%if 0%{?suse_version} && 0%{?suse_version} > 1140 +BuildRequires: python3-base +%endif + +%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1} +BuildArchitectures: 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 +Summary: Python Lex & Yacc +License: LGPL-2.1+ +Group: Development/Languages/Python +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}" +python3 setup.py build + +%install +python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +chmod a-x test/* + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc ANNOUNCE CHANGES README TODO +%{python3_sitelib}/%{mod_name}/ +%{python3_sitelib}/%{mod_name}-%{version}-py%{py3_ver}.egg-info + +%files doc +%defattr(-,root,root,-) +%doc doc example test + +%changelog