Fix test and avoid yacc table mismatch

- Add build dependency on cpp for unit tests
- Add dependency on python-ply version to prevent "yacc table file version is out of date"
- Fixes RHBZ#1668230
This commit is contained in:
Christian Heimes 2019-02-26 10:57:03 +01:00
parent 5ff5bcfcac
commit abd777e474

View File

@ -2,10 +2,14 @@
%global with_python3 1
%endif
# Ensure that pycparser uses the same YACC __tabversion__ as python-ply
# package to prevent "yacc table file version is out of date" problem.
%define ply_version %(LC_ALL=C rpm -q --qf '%%{VERSION}' python3-ply | grep -Eo '^[^.]+\.[^.]+')
Name: python-pycparser
Summary: C parser and AST generator written in Python
Version: 2.14
Release: 17%{?dist}
Release: 18%{?dist}
License: BSD
URL: http://github.com/eliben/pycparser
Source0: http://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz
@ -23,6 +27,7 @@ BuildRequires: python2-devel python2-setuptools
# for unit tests
BuildRequires: dos2unix
BuildRequires: python2-ply >= 3.6
BuildRequires: cpp
%if 0%{?with_python3}
BuildRequires: python3-devel python3-setuptools
@ -37,7 +42,7 @@ need to parse C source code.
%package -n python2-pycparser
Summary: C parser and AST generator written in Python
Requires: python2-ply >= 3.6
Requires: python2-ply = %{ply_version}
%{?python_provide:%python_provide python2-pycparser}
%description -n python2-pycparser
@ -48,7 +53,7 @@ need to parse C source code.
%if 0%{?with_python3}
%package -n python3-pycparser
Summary: C parser and AST generator written in Python
Requires: python3-ply
Requires: python3-ply = %{ply_version}
%{?python_provide:%python_provide python3-pycparser}
%description -n python3-pycparser
@ -110,6 +115,11 @@ popd
%endif # with_python3
%changelog
* Tue Feb 26 2019 Christian Heimes <cheimes@redhat.com> - 2.14-18
- Add build dependency on cpp for unit tests
- Add dependency on python-ply version to prevent "yacc table file version is out of date"
- Fixes RHBZ#1668230
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild