On Mon, 2024-02-19 at 23:26 -0500, Eli Schwartz wrote:
> The meson-python build backend -- as the name suggests -- uses meson
> under the hood. We have a meson eclass which does lots of useful things
> pertinent to meson. Make sure it gets invoked.
> 
> Signed-off-by: Eli Schwartz <eschwart...@gmail.com>
> ---
>  eclass/distutils-r1.eclass | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> index c0d1992ccce0..35825d4c3aa6 100644
> --- a/eclass/distutils-r1.eclass
> +++ b/eclass/distutils-r1.eclass
> @@ -197,6 +197,10 @@ _DISTUTILS_R1_ECLASS=1
>  inherit flag-o-matic
>  inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs
>  
> +if [[ ${DISTUTILS_USE_PEP517} = meson-python ]]; then
> +     inherit meson
> +fi
> +
>  if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
>       inherit python-r1
>  else
> @@ -1386,6 +1390,7 @@ distutils_pep517_install() {
>                       )
>                       ;;
>               meson-python)
> +                     meson_src_configure "${DISTUTILS_ARGS[@]}"

NAK.  You're calling configure twice, possibly with disjoint results. 
This is bound to be a mess, as you discovered yourself.

>                       local -x NINJAOPTS=$(get_NINJAOPTS)
>                       config_settings=$(
>                               "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || 
> die
> @@ -1397,7 +1402,6 @@ distutils_pep517_install() {
>                                       ninjaopts = 
> shlex.split(os.environ["NINJAOPTS"])
>                                       print(json.dumps({
>                                               "builddir": "${BUILD_DIR}",
> -                                             "setup-args": sys.argv[1:],
>                                               "compile-args": ["-v"] + 
> ninjaopts,
>                                       }))
>                               EOF

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to