diff options
-rw-r--r-- | meta/classes/setuptools3.bbclass | 34 |
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 | |||
4 | #B = "${WORKDIR}/build" | 4 | #B = "${WORKDIR}/build" |
5 | 5 | ||
6 | SETUPTOOLS_BUILD_ARGS ?= "" | 6 | SETUPTOOLS_BUILD_ARGS ?= "" |
7 | SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \ | ||
8 | --prefix=${prefix} \ | ||
9 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | ||
10 | --install-data=${datadir}" | ||
11 | |||
12 | SETUPTOOLS_PYTHON = "python3" | ||
13 | SETUPTOOLS_PYTHON:class-native = "nativepython3" | ||
14 | 7 | ||
15 | SETUPTOOLS_SETUP_PATH ?= "${S}" | 8 | SETUPTOOLS_SETUP_PATH ?= "${S}" |
16 | 9 | ||
@@ -24,42 +17,17 @@ setuptools3_do_compile() { | |||
24 | STAGING_INCDIR=${STAGING_INCDIR} \ | 17 | STAGING_INCDIR=${STAGING_INCDIR} \ |
25 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 18 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
26 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ | 19 | ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ |
27 | bdist_wheel ${SETUPTOOLS_BUILD_ARGS} || \ | 20 | bdist_wheel --verbose ${SETUPTOOLS_BUILD_ARGS} || \ |
28 | bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." | 21 | bbfatal_log "'${PYTHON_PN} setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." |
29 | } | 22 | } |
30 | setuptools3_do_compile[vardepsexclude] = "MACHINE" | 23 | setuptools3_do_compile[vardepsexclude] = "MACHINE" |
31 | do_compile[cleandirs] += "${SETUPTOOLS_SETUP_PATH}/dist" | 24 | do_compile[cleandirs] += "${SETUPTOOLS_SETUP_PATH}/dist" |
32 | 25 | ||
33 | setuptools3_do_install() { | 26 | setuptools3_do_install() { |
34 | cd ${SETUPTOOLS_SETUP_PATH} | ||
35 | |||
36 | pip_install_wheel_do_install | 27 | pip_install_wheel_do_install |
37 | |||
38 | # support filenames with *spaces* | ||
39 | find ${D} -name "*.py" -exec grep -q ${D} {} \; \ | ||
40 | -exec sed -i -e s:${D}::g {} \; | ||
41 | |||
42 | for i in ${D}${bindir}/* ${D}${sbindir}/*; do | ||
43 | if [ -f "$i" ]; then | ||
44 | sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${SETUPTOOLS_PYTHON}:g $i | ||
45 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | ||
46 | fi | ||
47 | done | ||
48 | |||
49 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth | ||
50 | |||
51 | # | ||
52 | # FIXME: Bandaid against wrong datadir computation | ||
53 | # | ||
54 | if [ -e ${D}${datadir}/share ]; then | ||
55 | mv -f ${D}${datadir}/share/* ${D}${datadir}/ | ||
56 | rmdir ${D}${datadir}/share | ||
57 | fi | ||
58 | } | 28 | } |
59 | setuptools3_do_install[vardepsexclude] = "MACHINE" | ||
60 | 29 | ||
61 | EXPORT_FUNCTIONS do_configure do_compile do_install | 30 | EXPORT_FUNCTIONS do_configure do_compile do_install |
62 | 31 | ||
63 | export LDSHARED="${CCLD} -shared" | 32 | export LDSHARED="${CCLD} -shared" |
64 | DEPENDS += "python3-setuptools-native python3-wheel-native" | 33 | DEPENDS += "python3-setuptools-native python3-wheel-native" |
65 | |||