mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
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)
This commit is contained in:
parent
0400769de1
commit
df95fc65fb
10
configure.ac
10
configure.ac
@ -214,6 +214,16 @@ AC_SUBST(CELT051_LIBS)
|
||||
AC_SUBST(CELT051_LIBDIR)
|
||||
SPICE_REQUIRES+=" celt051 >= 0.5.1.1"
|
||||
|
||||
if test ! -e client/generated_marshallers.cpp; then
|
||||
AC_MSG_CHECKING([for pyparsing python module])
|
||||
echo "import pyparsing" | python - >/dev/null 2&>1
|
||||
if test $? -ne 0 ; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([pyparsing python module is required to compile this package])
|
||||
fi
|
||||
AC_MSG_RESULT([found])
|
||||
fi
|
||||
|
||||
if test "$os_linux" = yes; then
|
||||
PKG_CHECK_MODULES(ALSA, alsa)
|
||||
AC_SUBST(ALSA_CFLAGS)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user