From 142eedd9a63d10469259f7b561334687348fe338d25f062971d2c344e83bd871 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 28 Feb 2013 09:00:08 +0000 Subject: [PATCH] Accepting request 156715 from home:posophe:branches:devel:languages:python Add python3 support OBS-URL: https://build.opensuse.org/request/show/156715 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycparser?expand=0&rev=2 --- pre_checkin.sh | 4 +++ python-pycparser.changes | 5 ++++ python3-pycparser.changes | 10 +++++++ python3-pycparser.spec | 58 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 pre_checkin.sh create mode 100644 python3-pycparser.changes create mode 100644 python3-pycparser.spec diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..2ee69af --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: *\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python setup.py,python3 setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,;s,python tests/all_tests.py,python3 tests/all_tests.py,' python-pycparser.spec > python3-pycparser.spec +cp python-pycparser.changes python3-pycparser.changes \ No newline at end of file diff --git a/python-pycparser.changes b/python-pycparser.changes index fe4f8b1..0db404c 100644 --- a/python-pycparser.changes +++ b/python-pycparser.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 27 15:22:33 UTC 2013 - p.drouand@gmail.com + +- Initial python3 support + ------------------------------------------------------------------- Sun Feb 10 09:48:07 UTC 2013 - saschpe@suse.de diff --git a/python3-pycparser.changes b/python3-pycparser.changes new file mode 100644 index 0000000..0db404c --- /dev/null +++ b/python3-pycparser.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 27 15:22:33 UTC 2013 - p.drouand@gmail.com + +- Initial python3 support + +------------------------------------------------------------------- +Sun Feb 10 09:48:07 UTC 2013 - saschpe@suse.de + +- Initial version + diff --git a/python3-pycparser.spec b/python3-pycparser.spec new file mode 100644 index 0000000..df369e2 --- /dev/null +++ b/python3-pycparser.spec @@ -0,0 +1,58 @@ +# +# spec file for package python-pycparser +# +# Copyright (c) 2013 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/ + + +Name: python3-pycparser +Version: 2.09.1 +Release: 0 +License: BSD-3-Clause +Summary: C parser in Python +Url: https://bitbucket.org/eliben/pycparser +Group: Development/Languages/Python +Source: http://pypi.python.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz +BuildRequires: python3-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python3_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +%description +pycparser is a complete parser of the C language, written in pure Python using +the PLY parsing library. It parses C code into an AST and can serve as a +front-end for C compilers or analysis tools. + +%prep +%setup -q -n pycparser-%{version} + +%build +python3 setup.py build + +%install +python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} + +%if 0%{?suse_version} >= 1220 +%check +python3 tests/all_tests.py +%endif + +%files +%defattr(-,root,root,-) +%doc README.rst examples +%{python3_sitelib}/* + +%changelog