From df95fc65fb882e01202116f997afe330b8475b88 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Thu, 19 May 2011 15:59:07 +0200 Subject: add check for pyparsing Check both in configure.ac (after checking if we need to rebuild the marshalling files) and in the python script using pyparsing (for people modifying .proto files in tarballs) --- python_modules/spice_parser.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'python_modules/spice_parser.py') diff --git a/python_modules/spice_parser.py b/python_modules/spice_parser.py index 4c8a57a6..e20e8fc1 100644 --- a/python_modules/spice_parser.py +++ b/python_modules/spice_parser.py @@ -1,6 +1,11 @@ -from pyparsing import Literal, CaselessLiteral, Word, OneOrMore, ZeroOrMore, \ - Forward, delimitedList, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, \ - alphanums, ParseException, ParseResults, Keyword, StringEnd, replaceWith +try: + from pyparsing import Literal, CaselessLiteral, Word, OneOrMore, ZeroOrMore, \ + Forward, delimitedList, Group, Optional, Combine, alphas, nums, restOfLine, cStyleComment, \ + alphanums, ParseException, ParseResults, Keyword, StringEnd, replaceWith +except ImportError: + print "Module pyparsing not found." + exit(1) + import ptypes import sys -- cgit