mirror of
https://git.yoctoproject.org/poky
synced 2026-06-21 04:53:48 +02:00
It's not currently possible to set the build tree to be somewhere we control, but we know it will always be in the build directory alongside the setup.py so we can [cleandirs] that. MJ: helps with build/lib directory being added when a recipe is rebuilt in the same WORKDIR multiple times, e.g.: Just rebuilding python3-tqdm in the same TMPDIR after cherry-picking this: $ buildhistory-diff -p buildhistory build-minus-1 | grep PKGSIZE python3-google-auth/python3-google-auth: PKGSIZE changed from 11752510 to 1315694 (-89%) python3-googleapis-common-protos/python3-googleapis-common-protos: PKGSIZE changed from 7108856 to 794024 (-89%) $ wc -l python3-google-auth/2.29.0*/image/usr/lib/python3.12/site-packages/google_auth-2.29.0.dist-info/RECORD 554 python3-google-auth/2.29.0-old/image/usr/lib/python3.12/site-packages/google_auth-2.29.0.dist-info/RECORD 66 python3-google-auth/2.29.0/image/usr/lib/python3.12/site-packages/google_auth-2.29.0.dist-info/RECORD $ wc -l python3-googleapis-common-protos/1.63.0*/image/usr/lib/python3.12/site-packages/googleapis_common_protos-1.63.0.dist-info/RECORD 1166 python3-googleapis-common-protos/1.63.0-old/image/usr/lib/python3.12/site-packages/googleapis_common_protos-1.63.0.dist-info/RECORD 134 python3-googleapis-common-protos/1.63.0/image/usr/lib/python3.12/site-packages/googleapis_common_protos-1.63.0.dist-info/RECORD (From OE-Core rev: a0151ab56cf3fcaa6587e240b5454fed5315a534) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <martin.jansa@gmail.com> (cherry picked from commit f3854f4f60801e3b6788bee3a0a1850fc498d536) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
inherit setuptools3-base python_pep517
|
|
|
|
DEPENDS += "python3-setuptools-native python3-wheel-native"
|
|
|
|
SETUPTOOLS_BUILD_ARGS ?= ""
|
|
|
|
SETUPTOOLS_SETUP_PATH ?= "${S}"
|
|
|
|
setuptools3_do_configure() {
|
|
:
|
|
}
|
|
# This isn't nice, but is the best solutions to ensure clean builds for now.
|
|
# https://github.com/pypa/setuptools/issues/4732
|
|
do_configure[cleandirs] = "${SETUPTOOLS_SETUP_PATH}/build"
|
|
|
|
setuptools3_do_compile() {
|
|
cd ${SETUPTOOLS_SETUP_PATH}
|
|
NO_FETCH_BUILD=1 \
|
|
STAGING_INCDIR=${STAGING_INCDIR} \
|
|
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
|
${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
|
|
bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \
|
|
bbfatal_log "'python3 setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
|
|
}
|
|
setuptools3_do_compile[vardepsexclude] = "MACHINE"
|
|
do_compile[cleandirs] += "${PEP517_WHEEL_PATH}"
|
|
|
|
# This could be removed in the future but some recipes in meta-oe still use it
|
|
setuptools3_do_install() {
|
|
python_pep517_do_install
|
|
}
|
|
|
|
EXPORT_FUNCTIONS do_configure do_compile do_install
|
|
|
|
export LDSHARED="${CCLD} -shared"
|