diff options
-rw-r--r-- | meta/classes/distutils3.bbclass | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index a277921dd0..7356b5245a 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass | |||
@@ -1,5 +1,8 @@ | |||
1 | inherit distutils3-base | 1 | inherit distutils3-base |
2 | 2 | ||
3 | B = "${WORKDIR}/build" | ||
4 | distutils_do_configure[cleandirs] = "${B}" | ||
5 | |||
3 | DISTUTILS_BUILD_ARGS ?= "" | 6 | DISTUTILS_BUILD_ARGS ?= "" |
4 | DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ | 7 | DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ |
5 | --prefix=${prefix} \ | 8 | --prefix=${prefix} \ |
@@ -10,28 +13,28 @@ DISTUTILS_PYTHON = "python3" | |||
10 | DISTUTILS_PYTHON_class-native = "nativepython3" | 13 | DISTUTILS_PYTHON_class-native = "nativepython3" |
11 | 14 | ||
12 | distutils3_do_configure() { | 15 | distutils3_do_configure() { |
13 | if [ "${CLEANBROKEN}" != "1" ] ; then | 16 | : |
14 | NO_FETCH_BUILD=1 \ | ||
15 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean ${DISTUTILS_BUILD_ARGS} | ||
16 | fi | ||
17 | } | 17 | } |
18 | 18 | ||
19 | distutils3_do_compile() { | 19 | distutils3_do_compile() { |
20 | cd ${S} | ||
20 | NO_FETCH_BUILD=1 \ | 21 | NO_FETCH_BUILD=1 \ |
21 | STAGING_INCDIR=${STAGING_INCDIR} \ | 22 | STAGING_INCDIR=${STAGING_INCDIR} \ |
22 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 23 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
23 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ | 24 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ |
24 | build ${DISTUTILS_BUILD_ARGS} || \ | 25 | build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ |
25 | bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed." | 26 | bbfatal_log "'${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS}' execution failed." |
26 | } | 27 | } |
27 | distutils3_do_compile[vardepsexclude] = "MACHINE" | 28 | distutils3_do_compile[vardepsexclude] = "MACHINE" |
28 | 29 | ||
29 | distutils3_do_install() { | 30 | distutils3_do_install() { |
31 | cd ${S} | ||
30 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | 32 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
31 | STAGING_INCDIR=${STAGING_INCDIR} \ | 33 | STAGING_INCDIR=${STAGING_INCDIR} \ |
32 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 34 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
33 | PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ | 35 | PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ |
34 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \ | 36 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py \ |
37 | build --build-base=${B} install --skip-build ${DISTUTILS_INSTALL_ARGS} || \ | ||
35 | bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed." | 38 | bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed." |
36 | 39 | ||
37 | # support filenames with *spaces* | 40 | # support filenames with *spaces* |