@@ -1,6 +1,7 @@
-inherit setuptools3-base
+inherit setuptools3-base pip_install_wheel
-B = "${WORKDIR}/build"
+# bdist_wheel builds in ./dist
+#B = "${WORKDIR}/build"
SETUPTOOLS_BUILD_ARGS ?= ""
SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \
@@ -23,20 +24,15 @@ setuptools3_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
- build --build-base=${B} ${SETUPTOOLS_BUILD_ARGS} || \
- bbfatal_log "'${PYTHON_PN} setup.py build ${SETUPTOOLS_BUILD_ARGS}' execution failed."
+ bdist_wheel ${SETUPTOOLS_BUILD_ARGS} || \
+ bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
}
setuptools3_do_compile[vardepsexclude] = "MACHINE"
setuptools3_do_install() {
cd ${SETUPTOOLS_SETUP_PATH}
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
- build --build-base=${B} install --skip-build ${SETUPTOOLS_INSTALL_ARGS} || \
- bbfatal_log "'${PYTHON_PN} setup.py install ${SETUPTOOLS_INSTALL_ARGS}' execution failed."
+
+ pip_install_wheel_do_install
# support filenames with *spaces*
find ${D} -name "*.py" -exec grep -q ${D} {} \; \
@@ -64,5 +60,5 @@ setuptools3_do_install[vardepsexclude] = "MACHINE"
EXPORT_FUNCTIONS do_configure do_compile do_install
export LDSHARED="${CCLD} -shared"
-DEPENDS += "python3-setuptools-native"
+DEPENDS += "python3-setuptools-native python3-wheel-native"
Depend on python3-wheel-native so that we can build with 'setup.py bdist_wheel'. Use pip_install_wheel class to install the built wheels with pip, as intended by upstream Python. [YOCTO #14638] Signed-off-by: Tim Orling <tim.orling@konsulko.com> --- meta/classes/setuptools3.bbclass | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)