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
This commit is contained in:
Sascha Peilicke 2013-02-28 09:00:08 +00:00 committed by Git OBS Bridge
parent 7b12594a09
commit 142eedd9a6
4 changed files with 77 additions and 0 deletions

4
pre_checkin.sh Normal file
View File

@ -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

View File

@ -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

10
python3-pycparser.changes Normal file
View File

@ -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

58
python3-pycparser.spec Normal file
View File

@ -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