diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2024-01-18 15:28:31 -0500 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-03-08 06:40:24 +0100 |
commit | 94d7e7e96945ed47e6d3ea6591cf498fd77994b8 (patch) | |
tree | 0725d271770553aedd9657559d1162441a013f89 /eclass | |
parent | meson.eclass: move python_export_utf8_locale to meson_src_configure (diff) | |
download | gentoo-94d7e7e96945ed47e6d3ea6591cf498fd77994b8.tar.gz gentoo-94d7e7e96945ed47e6d3ea6591cf498fd77994b8.tar.bz2 gentoo-94d7e7e96945ed47e6d3ea6591cf498fd77994b8.zip |
distutils-r1.eclass: wire up meson-python to meson.eclass
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, by prying out the options
that meson_src_configure would use and setting passing them as our seed
values for gpep517.
[sam: Tweak '=' style.]
[sam: Tweak mesonargs->MESONARGS for final version of e9189344b971f7ee0e2bec36650c57dbade4f122.]
[sam: Update local variable list.]
[mgorny: Add local variables for LTO filtering.]
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35554
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/distutils-r1.eclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 134cb39f276a..e0c54d81a846 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,9 +1390,19 @@ distutils_pep517_install() { ) ;; meson-python) + # variables defined by setup_meson_src_configure + local MESONARGS=() BOOST_INCLUDEDIR BOOST_LIBRARYDIR NM READELF + # it also calls filter-lto + local x + for x in $(all-flag-vars); do + local -x "${x}=${!x}" + done + + setup_meson_src_configure "${DISTUTILS_ARGS[@]}" + local -x NINJAOPTS=$(get_NINJAOPTS) config_settings=$( - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + "${EPYTHON}" - "${MESONARGS[@]}" <<-EOF || die import json import os import shlex |