Re: [RFC 02/21] maint: Check libclang and its python3 binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 10, 2020 at 09:20:30AM +0800, Shi Lei wrote:
> Make sure libclang and its python3 binding have been installed.
> 
> Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx>
> ---
>  configure.ac | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 6c8ac2f..747e52a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -707,6 +707,18 @@ if test -z "$FLAKE8"; then
>      AC_MSG_WARN(['flake8' binary is required to check python code style])
>  fi
>  
> +dnl Need libclang and its python3 binding to generate some functions
> +LIBCLANG_LINE=`ldconfig -p | grep libclang`

As with previous patch, this ends up matching libclang-cpp.so for my
host and thus fails.

IMHO, we shouldn't be trying to get the path at all - just let the
python library use its default....

> +LIBCLANG_PATH=`expr "$LIBCLANG_LINE" : '.* => \(.*\)$'`
> +if test -z "$LIBCLANG_PATH"; then
> +    AC_MSG_ERROR([libclang is required by libvirt])
> +fi

So all this can go.

> +HAVE_PY3_CLANG=`python3 -c 'import clang.cindex;print("ok")' 2>/dev/null`
> +if test -z "$HAVE_PY3_CLANG"; then
> +    AC_MSG_ERROR(['python3-clang' is required. Execute 'pip3 install clang'.])
> +fi

but this is needed to check for the require python lib.

> +AC_SUBST(LIBCLANG_PATH)
> +
>  dnl Python3 < 3.7 treats the C locale as 7-bit only.
>  dnl We must force env vars so it treats it as UTF-8
>  dnl regardless of the user's locale.
> -- 
> 2.17.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux