diff options
-rw-r--r-- | meta/classes/distutils.bbclass | 11 | ||||
-rw-r--r-- | meta/classes/distutils3.bbclass | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 9862731493..b5c9c2fbbd 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass | |||
@@ -9,6 +9,9 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ | |||
9 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | 9 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ |
10 | --install-data=${datadir}" | 10 | --install-data=${datadir}" |
11 | 11 | ||
12 | DISTUTILS_PYTHON = "python" | ||
13 | DISTUTILS_PYTHON_class-native = "nativepython" | ||
14 | |||
12 | distutils_do_configure() { | 15 | distutils_do_configure() { |
13 | if [ "${CLEANBROKEN}" != "1" ] ; then | 16 | if [ "${CLEANBROKEN}" != "1" ] ; then |
14 | NO_FETCH_BUILD=1 \ | 17 | NO_FETCH_BUILD=1 \ |
@@ -53,18 +56,14 @@ distutils_do_install() { | |||
53 | 56 | ||
54 | if test -e ${D}${bindir} ; then | 57 | if test -e ${D}${bindir} ; then |
55 | for i in ${D}${bindir}/* ; do \ | 58 | for i in ${D}${bindir}/* ; do \ |
56 | if [ ${PN} != "${BPN}-native" ]; then | 59 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i |
57 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i | ||
58 | fi | ||
59 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 60 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
60 | done | 61 | done |
61 | fi | 62 | fi |
62 | 63 | ||
63 | if [ -e ${D}${sbindir} ]; then | 64 | if [ -e ${D}${sbindir} ]; then |
64 | for i in ${D}${sbindir}/* ; do \ | 65 | for i in ${D}${sbindir}/* ; do \ |
65 | if [ ${PN} != "${BPN}-native" ]; then | 66 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i |
66 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${USRBINPATH}/env\ python:g $i | ||
67 | fi | ||
68 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 67 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
69 | done | 68 | done |
70 | fi | 69 | fi |
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index 834e322474..42e7f5ae53 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass | |||
@@ -10,6 +10,9 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ | |||
10 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | 10 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ |
11 | --install-data=${datadir}" | 11 | --install-data=${datadir}" |
12 | 12 | ||
13 | DISTUTILS_PYTHON = "python3" | ||
14 | DISTUTILS_PYTHON_class-native = "nativepython3" | ||
15 | |||
13 | distutils3_do_configure() { | 16 | distutils3_do_configure() { |
14 | if [ "${CLEANBROKEN}" != "1" ] ; then | 17 | if [ "${CLEANBROKEN}" != "1" ] ; then |
15 | NO_FETCH_BUILD=1 \ | 18 | NO_FETCH_BUILD=1 \ |
@@ -57,14 +60,14 @@ distutils3_do_install() { | |||
57 | 60 | ||
58 | if test -e ${D}${bindir} ; then | 61 | if test -e ${D}${bindir} ; then |
59 | for i in ${D}${bindir}/* ; do \ | 62 | for i in ${D}${bindir}/* ; do \ |
60 | sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i | 63 | sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i |
61 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 64 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
62 | done | 65 | done |
63 | fi | 66 | fi |
64 | 67 | ||
65 | if test -e ${D}${sbindir}; then | 68 | if test -e ${D}${sbindir}; then |
66 | for i in ${D}${sbindir}/* ; do \ | 69 | for i in ${D}${sbindir}/* ; do \ |
67 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i | 70 | sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i |
68 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i | 71 | sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i |
69 | done | 72 | done |
70 | fi | 73 | fi |