All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths
@ 2013-03-19  8:24 Koen Kooi
  2013-03-19  8:48 ` Koen Kooi
  0 siblings, 1 reply; 2+ messages in thread
From: Koen Kooi @ 2013-03-19  8:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths
  2013-03-19  8:24 [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths Koen Kooi
@ 2013-03-19  8:48 ` Koen Kooi
  0 siblings, 0 replies; 2+ messages in thread
From: Koen Kooi @ 2013-03-19  8:48 UTC (permalink / raw)
  To: openembedded-core


Op 19 mrt. 2013, om 09:24 heeft Koen Kooi <koen@dominion.thruhere.net> het volgende geschreven:

> 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

Ignore this one, the sed is a bit too greedy and prevents the sstate-fixup from functioning properly. V2 will follow after more testing.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-19  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19  8:24 [PATCH] python: fix on-target use of distutils/setuptools by removing references to buildpaths Koen Kooi
2013-03-19  8:48 ` Koen Kooi

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.