distutils/distutils3: do not try to fetch code during do_configure

For distutils3, any setup.py invoking will cause setup_requires
argument to trigger a code fetching. Since the following commit
applied in oe-core, code fetching occurs during do_confugire
before the do_compile.
...
b805cef distutils: clean the build tree in do_configure
...

Refer what do_compile did, add var-NO_FETCH_BUILD to do_configure.

Sync with distutils3, add do_configure to distutils also.

[YOCTO #12084]

(From OE-Core rev: 9d556092fcc6f04c487afd126d52935bac133165)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Hongxu Jia
2018-07-26 22:50:21 +08:00
committed by Richard Purdie
parent c40f535fbf
commit ce31c498f8
2 changed files with 9 additions and 1 deletions

View File

@@ -9,6 +9,13 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \
--install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"
distutils_do_configure() {
if [ "${CLEANBROKEN}" != "1" ] ; then
NO_FETCH_BUILD=1 \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean ${DISTUTILS_BUILD_ARGS}
fi
}
distutils_do_compile() {
NO_FETCH_BUILD=1 \
STAGING_INCDIR=${STAGING_INCDIR} \
@@ -80,6 +87,6 @@ distutils_do_install() {
fi
}
EXPORT_FUNCTIONS do_compile do_install
EXPORT_FUNCTIONS do_configure do_compile do_install
export LDSHARED="${CCLD} -shared"

View File

@@ -12,6 +12,7 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \
distutils3_do_configure() {
if [ "${CLEANBROKEN}" != "1" ] ; then
NO_FETCH_BUILD=1 \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean ${DISTUTILS_BUILD_ARGS}
fi
}