2013-02-10 09:51:44 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pycparser
|
|
|
|
#
|
2016-01-15 09:40:22 +00:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-02-10 09:51:44 +00:00
|
|
|
#
|
|
|
|
# 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/
|
2015-05-16 12:51:48 +00:00
|
|
|
#
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-pycparser
|
2016-01-15 09:40:22 +00:00
|
|
|
Version: 2.14
|
2013-02-10 09:51:44 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: C parser in Python
|
2015-05-16 12:51:48 +00:00
|
|
|
License: BSD-3-Clause
|
2013-02-10 09:51:44 +00:00
|
|
|
Group: Development/Languages/Python
|
2015-05-16 12:51:48 +00:00
|
|
|
Url: https://github.com/eliben/pycparser
|
2016-01-15 09:40:22 +00:00
|
|
|
Source0: https://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
|
|
|
|
#PATCH-FIX-UPSTREAM
|
|
|
|
Patch0: 0002-Add-missing-typedef-sa_family_t-from-sys-socket.h.patch
|
|
|
|
BuildRequires: fdupes
|
2013-02-10 09:51:44 +00:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_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
|
2016-01-15 09:40:22 +00:00
|
|
|
%setup -q -n pycparser-release_v%{version}
|
|
|
|
%patch0 -p1
|
2015-05-16 12:51:48 +00:00
|
|
|
# fix end of line
|
|
|
|
sed -i 's/\r//' LICENSE
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2016-01-15 09:40:22 +00:00
|
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}
|
|
|
|
cp -r utils/fake_libc_include/ %{buildroot}/%{_datadir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}/%{_datadir}/%{name}/fake_libc_include/
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
python tests/all_tests.py
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2013-08-12 08:43:05 +00:00
|
|
|
%doc LICENSE README.rst examples
|
2013-02-10 09:51:44 +00:00
|
|
|
%{python_sitelib}/*
|
2016-01-15 09:40:22 +00:00
|
|
|
%{_datadir}/%{name}
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%changelog
|