diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-07-19 22:59:04 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-26 13:16:40 +0100 |
commit | 896b36074641ad5120ca29888d1e71199aa1b1e0 (patch) | |
tree | d8f3d7710fda7431fe16a22b4c8a2e79b3fa78b4 /meta/classes/distutils.bbclass | |
parent | 5b6fbaf7272215dd58b7c74f678cc49642eb0219 (diff) | |
download | poky-896b36074641ad5120ca29888d1e71199aa1b1e0.tar.gz |
distutils/setuptools, distutils3/setuptools3: improve reproducibility
- Unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools
- Supply "--root" directory to the "install" command, and use
it as a prefix to strip off the purported filename encoded
in bytecode files. (It strips build path prefix from .pyc files)
[YOCTO #8446]
[YOCTO #12084]
(From OE-Core rev: 21f0c5a50e00ac34975d79fd48f08730d8f19b15)
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>
Diffstat (limited to 'meta/classes/distutils.bbclass')
-rw-r--r-- | meta/classes/distutils.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index c2f74039cb..3cf1d6b786 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass | |||
@@ -4,8 +4,10 @@ DISTUTILS_BUILD_ARGS ?= "" | |||
4 | DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" | 4 | DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" |
5 | DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ | 5 | DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ |
6 | --install-data=${STAGING_DATADIR}" | 6 | --install-data=${STAGING_DATADIR}" |
7 | DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ | 7 | DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ |
8 | --install-data=${D}/${datadir}" | 8 | --prefix=${prefix} \ |
9 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | ||
10 | --install-data=${datadir}" | ||
9 | 11 | ||
10 | distutils_do_compile() { | 12 | distutils_do_compile() { |
11 | NO_FETCH_BUILD=1 \ | 13 | NO_FETCH_BUILD=1 \ |
@@ -35,7 +37,7 @@ distutils_do_install() { | |||
35 | STAGING_INCDIR=${STAGING_INCDIR} \ | 37 | STAGING_INCDIR=${STAGING_INCDIR} \ |
36 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 38 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
37 | PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ | 39 | PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ |
38 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ | 40 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \ |
39 | bbfatal_log "${PYTHON_PN} setup.py install execution failed." | 41 | bbfatal_log "${PYTHON_PN} setup.py install execution failed." |
40 | 42 | ||
41 | # support filenames with *spaces* | 43 | # support filenames with *spaces* |