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:31 +0100 |
commit | 21f0c5a50e00ac34975d79fd48f08730d8f19b15 (patch) | |
tree | e98372c554452fd702201bc940c1d86317051129 /meta/classes/distutils.bbclass | |
parent | ed0413babaf10ccf729472f603bbe32d84ba1931 (diff) | |
download | openembedded-core-contrib-21f0c5a50e00ac34975d79fd48f08730d8f19b15.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]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
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 c2f74039cb4..3cf1d6b7868 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -4,8 +4,10 @@ DISTUTILS_BUILD_ARGS ?= "" DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ --install-data=${STAGING_DATADIR}" -DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ - --install-data=${D}/${datadir}" +DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ + --prefix=${prefix} \ + --install-lib=${PYTHON_SITEPACKAGES_DIR} \ + --install-data=${datadir}" distutils_do_compile() { NO_FETCH_BUILD=1 \ @@ -35,7 +37,7 @@ distutils_do_install() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \ bbfatal_log "${PYTHON_PN} setup.py install execution failed." # support filenames with *spaces* |