2013-02-10 09:51:44 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pycparser
|
|
|
|
#
|
2017-03-16 18:01:40 +00:00
|
|
|
# Copyright (c) 2017 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
|
|
|
|
|
|
|
|
2017-03-16 18:01:40 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-02-10 09:51:44 +00:00
|
|
|
Name: python-pycparser
|
2017-07-12 09:15:39 +00:00
|
|
|
Version: 2.18
|
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
|
2017-03-16 18:01:40 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz
|
2016-01-16 14:31:15 +00:00
|
|
|
Source99: %{name}-rpmlintrc
|
2017-03-16 18:01:40 +00:00
|
|
|
Patch1: fix-lexer-build.patch
|
|
|
|
BuildRequires: %{python_module devel}
|
2016-01-15 09:40:22 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-16 18:01:40 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2013-02-10 09:51:44 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
2017-03-16 18:01:40 +00:00
|
|
|
|
|
|
|
%python_subpackages
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%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
|
2017-03-16 18:01:40 +00:00
|
|
|
%setup -q -n pycparser-%{version}
|
|
|
|
%patch1 -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
|
2017-03-16 18:01:40 +00:00
|
|
|
%python_build
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%install
|
2017-03-16 18:01:40 +00:00
|
|
|
%python_install
|
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
2013-02-10 09:51:44 +00:00
|
|
|
|
|
|
|
%check
|
2017-03-16 18:01:40 +00:00
|
|
|
%python_exec tests/all_tests.py
|
2013-02-10 09:51:44 +00:00
|
|
|
|
2017-03-16 18:01:40 +00:00
|
|
|
%files %{python_files}
|
2013-02-10 09:51:44 +00:00
|
|
|
%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}/*
|
|
|
|
|
|
|
|
%changelog
|