From abd777e474a0f475d06306be276fa7a4195bf8e7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 26 Feb 2019 10:57:03 +0100 Subject: [PATCH] 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 --- python-pycparser.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pycparser.spec b/python-pycparser.spec index 27f245c..588e386 100644 --- a/python-pycparser.spec +++ b/python-pycparser.spec @@ -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 - 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 - 2.14-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild