forked from pool/python-pycparser
Accepting request 480701 from devel:languages:python:singlespec
singlespec + version update OBS-URL: https://build.opensuse.org/request/show/480701 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycparser?expand=0&rev=15
This commit is contained in:
committed by
Git OBS Bridge
parent
1b52f3e2ad
commit
81e2118931
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pycparser
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,25 +16,24 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pycparser
|
||||
Version: 2.14
|
||||
Version: 2.17
|
||||
Release: 0
|
||||
Summary: C parser in Python
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/eliben/pycparser
|
||||
Source0: https://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-%{version}.tar.gz
|
||||
Source99: %{name}-rpmlintrc
|
||||
#PATCH-FIX-UPSTREAM
|
||||
Patch0: 0002-Add-missing-typedef-sa_family_t-from-sys-socket.h.patch
|
||||
Patch1: fix-lexer-build.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
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
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
pycparser is a complete parser of the C language, written in pure Python using
|
||||
@@ -42,27 +41,24 @@ 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-release_v%{version}
|
||||
%patch0 -p1
|
||||
%setup -q -n pycparser-%{version}
|
||||
%patch1 -p1
|
||||
# fix end of line
|
||||
sed -i 's/\r//' LICENSE
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
mkdir -p %{buildroot}/%{_datadir}/%{name}
|
||||
cp -r utils/fake_libc_include/ %{buildroot}/%{_datadir}/%{name}
|
||||
%fdupes -s %{buildroot}/%{_datadir}/%{name}/fake_libc_include/
|
||||
%python_install
|
||||
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
|
||||
|
||||
%check
|
||||
python tests/all_tests.py
|
||||
%python_exec tests/all_tests.py
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README.rst examples
|
||||
%{python_sitelib}/*
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user