[Spice-devel] [PATCH 1/3] add check for pyparsing

Uri Lublin uril at redhat.com
Wed Jun 22 08:12:42 PDT 2011


On 06/22/2011 12:09 PM, Christophe Fergeau wrote:
> 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)

I'm ok with this patch (aka ack).

Just wanted to note that the condition is not accurate/sufficient, for example 
pyparsing is also needed to build the server if generated* files are missing, or 
if spice.proto is modified. Also if client/generated_marshallers.cpp does not 
exist but server/generated* exist and only the server is being built, then there 
is no need for pyparsing. However it probably covers most of "real" scenarios, 
and is better than what we (don't) have today.



> ---
>   configure.ac                   |   10 ++++++++++
>   python_modules/spice_parser.py |   11 ++++++++---
>   2 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 18209bf..c058edd 100644
> --- a/configure.ac
> +++ b/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
> +




More information about the Spice-devel mailing list