Internally, it may call `die`, but the effects of such do not trigger
until the subshell completes. This meant that after it dies, meson setup
still runs after the traceback. In fact, the fact that it runs at all is
a problem, because a symptom of it running is that it runs *after* the
"If you need support, [...]" bit, and logs the command line followed by
"ERROR: Cannot find specified native file:".
This makes it quite frustrating to locate the actual error.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
We call this program many times inside a heredoc. If it fails and runs
`|| die` then the heredoc isn't killed, the main ebuild process is
killed. But by that time possibly dozens of $(meson-format-array ...)'s
have been run, each one printing its own traceback from `die`, which is
quite confusing.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
After the previous commit, meson.eclass doesn't modify *FLAGS anymore,
which means it is safe again to call other build systems alongside a
single meson-python wheel build.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
We filter LTO in order to generate meson's machine files describing the
*FLAGS values, with LTO stripped out and replaced by meson's -D b_lto
builtin option. Since the values are frozen into the machine files, the
variables themselves don't need to persist past the end of the function.
We already run setup_meson_src_configure inside a subshell just to avoid
messing with the environment across meson-multilib.eclass calls, and we
do similar in distutils-r1.eclass when invoking the meson-python build
backend. It is simpler and more straightforward if we instead make
setup_meson_src_configure itself avoid side effects -- and we don't want
to use a subshell there anyway.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Pass --verify-tags to "gpep517 install-wheel" when a new enough version
is installed along with a new enough version of dev-python/packaging
(which is a PDEPEND).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732
Set PYTHON_USEDEP and PYTHON_SINGLE_USEDEP for sub-phase functions when
running the build in single-impl mode. This ensures parity with
multi-impl mode where these variables are set by python_foreach_impl().
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732
distutils_wheel_create() always passes --sysroot to gpep517 whenever
SYSROOT is set, and gpep517 requires the target interpreter's own
_sysconfigdata under it -- even for a pure-Python package. DEPEND only
got PYTHON_DEPS when DISTUTILS_EXT was set, so the build dies whenever
SYSROOT and ROOT diverge and the interpreter isn't in SYSROOT.
Invisible under the common crossdev setup (SYSROOT == ROOT), but
reproducible with plain crossdev by pointing ROOT elsewhere:
ROOT=/some/other/root ${CHOST}-emerge dev-python/pysocks
dies with "should have found one _sysconfigdata file, found []".
Closes: https://bugs.gentoo.org/981568
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732
Split DISTUTILS_WHEELS into a separate DISTUTILS_WHEELS array
and DISTUTILS_WHEEL_PATHS associative array, in order to preserve wheel
order. As it turns out, bash took associative arrays seriously and did
implement them as a hash map.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732
Add a safety check verifying whether all the previously built wheels
were built for a Python tag that's not newer than the current
implementation. Given we are always building from the oldest version to
newest, this must always be true and we fail immediately if it is not.
Note that since we're merely checking this particular aspect, we do not
check whether the combination of the Python tag and the ABI tag is
compatible.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1732