All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <koen@dominion.thruhere.net>
To: openembedded-core@lists.openembedded.org
Cc: Koen Kooi <koen@dominion.thruhere.net>
Subject: [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths
Date: Tue, 19 Mar 2013 09:24:33 +0100	[thread overview]
Message-ID: <1363681473-26243-1-git-send-email-koen@dominion.thruhere.net> (raw)

Running 'python setup.py build' would fail due to the python Makefile having

CC=             i586-angstrom-linux-gcc  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
CXX=            i586-angstrom-linux-g++  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
'--with-libtool-sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2'

And more

Multiple users have reported this problem:

http://hipstercircuits.com/?p=499
http://www.gigamegablog.com/2012/09/09/beaglebone-coding-101-spi-output/

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-devtools/python/python_2.7.3.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index c181933..6b127a0 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -109,11 +109,17 @@ do_install() {
 
 	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
 
+	# Remove references to buildmachine paths in target Makefile
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+	       -e 's:${STAGING_DIR_TARGET}::g'\
+	       ${D}${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
 	if [ -e ${WORKDIR}/sitecustomize.py ]; then
 		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
 	fi
 
 	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+
 }
 
 SSTATE_SCAN_FILES += "Makefile"
-- 
1.8.1.4




             reply	other threads:[~2013-03-19  8:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19  8:24 Koen Kooi [this message]
2013-03-19  8:48 ` [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths Koen Kooi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363681473-26243-1-git-send-email-koen@dominion.thruhere.net \
    --to=koen@dominion.thruhere.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.