summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-07 15:26:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-08 09:42:59 +0000
commit57c477ca13e352b6f9b21385abbfaad9778c6398 (patch)
treeda232301c37b12921a75b3b09bff4466d80bca17 /meta/classes
parent0d29988958e48534a0076307bb2393a3c1309e03 (diff)
downloadopenembedded-core-contrib-57c477ca13e352b6f9b21385abbfaad9778c6398.tar.gz
setuptools3.bbclass: clean up
There's been a lot of work in this class lately, so a little spring cleaning is needed. Create wheels verbosely to help debug problems. Remove unused SETUPTOOLS_INSTALL_ARGS, these can't be passed to bdist_wheel. Remove duplicate manipulation of files in bindir as pip_install_wheel does the same. Remove obsolete deletion of easy-install.pth, wheels don't generate that. Remove obsolete ${datadir}/share fixup, pip-installed wheels can't generate that path combination. Remove purging of ${D} references from *.py, these won't be written by standard setuptools, and recipes can do it themselves to work around specific issues if needed. Remove obsolete vardepsexclude of MACHINE on do_install, as that variable isn't referenced. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/setuptools3.bbclass34
1 files changed, 1 insertions, 33 deletions
diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
index 564996c556..1b1a8aac76 100644
--- a/meta/classes/setuptools3.bbclass
+++ b/meta/classes/setuptools3.bbclass
@@ -4,13 +4,6 @@ inherit setuptools3-base pip_install_wheel
#B = "${WORKDIR}/build"
SETUPTOOLS_BUILD_ARGS ?= ""
-SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
- --prefix=${prefix} \
- --install-lib=${PYTHON_SITEPACKAGES_DIR} \
- --install-data=${datadir}"
-
-SETUPTOOLS_PYTHON = "python3"
-SETUPTOOLS_PYTHON:class-native = "nativepython3"
SETUPTOOLS_SETUP_PATH ?= "${S}"
@@ -24,42 +17,17 @@ setuptools3_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
- bdist_wheel ${SETUPTOOLS_BUILD_ARGS} || \
+ bdist_wheel --verbose ${SETUPTOOLS_BUILD_ARGS} || \
bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
}
setuptools3_do_compile[vardepsexclude] = "MACHINE"
do_compile[cleandirs] += "${SETUPTOOLS_SETUP_PATH}/dist"
setuptools3_do_install() {
- cd ${SETUPTOOLS_SETUP_PATH}
-
pip_install_wheel_do_install
-
- # support filenames with *spaces*
- find ${D} -name "*.py" -exec grep -q ${D} {} \; \
- -exec sed -i -e s:${D}::g {} \;
-
- for i in ${D}${bindir}/* ${D}${sbindir}/*; do
- if [ -f "$i" ]; then
- sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${SETUPTOOLS_PYTHON}:g $i
- sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
- fi
- done
-
- rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
-
- #
- # FIXME: Bandaid against wrong datadir computation
- #
- if [ -e ${D}${datadir}/share ]; then
- mv -f ${D}${datadir}/share/* ${D}${datadir}/
- rmdir ${D}${datadir}/share
- fi
}
-setuptools3_do_install[vardepsexclude] = "MACHINE"
EXPORT_FUNCTIONS do_configure do_compile do_install
export LDSHARED="${CCLD} -shared"
DEPENDS += "python3-setuptools-native python3-wheel-native"
-