summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/pip_install_wheel.bbclass8
-rw-r--r--meta/classes/setuptools3.bbclass1
2 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass
index 5b7e5cd706..3beff685bb 100644
--- a/meta/classes/pip_install_wheel.bbclass
+++ b/meta/classes/pip_install_wheel.bbclass
@@ -1,12 +1,14 @@
1DEPENDS:append = " python3-pip-native" 1DEPENDS:append = " python3-pip-native"
2 2
3def guess_pip_install_package_name(d): 3def guess_pip_install_package_name(d):
4 import re
4 '''https://www.python.org/dev/peps/pep-0491/#escaping-and-unicode''' 5 '''https://www.python.org/dev/peps/pep-0491/#escaping-and-unicode'''
5 return (d.getVar('PYPI_PACKAGE') or d.getVar('BPN')).replace('-', '_') 6 name = d.getVar('PYPI_PACKAGE') or re.sub(r"^python3-", "", d.getVar('BPN'))
7 return name.replace('-', '_')
6 8
7PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}" 9PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}"
8PIP_INSTALL_DIST_PATH ?= "${B}/dist" 10PIP_INSTALL_DIST_PATH ?= "${@d.getVar('SETUPTOOLS_SETUP_PATH') or d.getVar('B')}/dist"
9PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-${PV}-*.whl" 11PYPA_WHEEL ??= "${PIP_INSTALL_DIST_PATH}/${PIP_INSTALL_PACKAGE}-*-*.whl"
10 12
11PIP_INSTALL_ARGS ?= "\ 13PIP_INSTALL_ARGS ?= "\
12 -vvvv \ 14 -vvvv \
diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
index 12561340b0..564996c556 100644
--- a/meta/classes/setuptools3.bbclass
+++ b/meta/classes/setuptools3.bbclass
@@ -28,6 +28,7 @@ setuptools3_do_compile() {
28 bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." 28 bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed."
29} 29}
30setuptools3_do_compile[vardepsexclude] = "MACHINE" 30setuptools3_do_compile[vardepsexclude] = "MACHINE"
31do_compile[cleandirs] += "${SETUPTOOLS_SETUP_PATH}/dist"
31 32
32setuptools3_do_install() { 33setuptools3_do_install() {
33 cd ${SETUPTOOLS_SETUP_PATH} 34 cd ${SETUPTOOLS_SETUP_PATH}