Skip to contentSkip to conversation

python roadmap

DISCUSSION Michael 'Mickey' Lauer 3 participants 8 messages Jan 11, 2009 – Feb 26, 2009

lore
Share & tools
lore
#0 lore raw

You may have seen that I just branched off mickey/python2.6. Python 2.6 has been in org.oe.dev for quite a while and I have did extensive tests with it. It's now ready for public consumption, however since it's a major version upgrade, I need to bump all packages that ship something to ${libdir}/python2.x.

To get this in one commit, I'll do it in the branch. I'll also take this chance to go over all python related packages and run a cleanup round -- if there's something to clean up.

I expect this to be complete in one or two weeks. Please hold off any major changes to Python-recipes until then.

With regards to Python 3, I will probably add it in February. It's going to be a long time until the critical mass of external packages have upgraded to v3, I expect not before 2010. We can take it easy with BitBake as well, but we should start removing the stuff that Python 2.6 claims to be deprecated asap.

Cheers,

Mickey.

#1 lore raw

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Signature · 1 line
:M:
#2 lore raw

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

do_compile tries to load a .so on the host which was build for armeb and complains about wrong byteorder. But there is no complain when MACHINE=nslu2le in which case the .so shouldn't be loadable, too (it's for arm after all, not x86). AND python25 used exactly the same do_compile method, and does not fail!

So I'm a little confused how it's supposed to work. Could you please take a look at it?

Thanks,
Vitus

Signature · 1 line
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)
#3 lore raw

Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:

Quoted 6 lines

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Quoted 8 lines

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

...

Does anyone build packages for bigendian machines?

Vitus

Signature · 1 line
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)
#4 lore raw
Quoted 11 lines · Vitus Jensen

Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:

Quoted 9 lines

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

Quoted 7 lines
Quoted 4 lines

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

...

Does anyone build packages for bigendian machines?

yes

#5 lore raw

Am Tue, 17 Feb 2009 09:09:43 +0100 schrieb Koen Kooi:

Quoted 16 lines · Vitus Jensen
Quoted 15 lines

Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:

Quoted 13 lines

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

Quoted 5 lines
Quoted 3 lines

...

Does anyone build packages for bigendian machines?

yes

OK. Restarting from scratch...

Signature · 1 line
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)
#6 lore raw

Am Tue, 17 Feb 2009 10:03:12 +0000 schrieb Vitus Jensen:

Quoted 18 lines

Am Tue, 17 Feb 2009 09:09:43 +0100 schrieb Koen Kooi:

Quoted 16 lines · Vitus Jensen
Quoted 15 lines

Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:

Quoted 13 lines

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

...

Does anyone build packages for bigendian machines?

yes

OK. Restarting from scratch...

... doesn't build after clearing TMPDIR.

I will reinstall my slug to nslu2le and build those packages.

Signature · 1 line
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)
#7 lore raw
In reply to Vitus Jensen

Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:

Quoted 15 lines

Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:

Quoted 3 lines

Thanks to some extrashifts this work has proceeded faster than scheduled. I plan to merge mickey/python26 into master on friday. If you see something dangerous, yell.

Yell ;-)

See http://bugs.openembedded.net/show_bug.cgi?id=5013

python26 fails to build for the big-endian machines I tried, namely nslu2be. And as python25 was removed it is a real blocker for packages which DEPEND on pathon, which inturn is the case for php. And php I'm trying to get a version working again.

Quoted 5 lines

do_compile tries to load a .so on the host which was build for armeb and complains about wrong byteorder. But there is no complain when MACHINE=nslu2le in which case the .so shouldn't be loadable, too (it's for arm after all, not x86). AND python25 used exactly the same do_compile method, and does not fail!

Yes yes, I know: python builds fine on all hosts ;-)

But here is a patch set which forces do_compile() to load shared objects from STAGING_LIBDIR_NATIVE instead of work/python-2.6.1/ (which contains target code). Additionally I removed Makefile patching which created senseless paths
(like /oestuff/.../arm/python/oestuff/...arm/python). Tested on ixp4xxbe, nslu2be and nslu2le.

packages/python/python-2.6.1/07-ld_library_path.patch new file +16 -0
new file mode 100644
index 0000000..bdc47d7
@@ -0,0 +1,16 @@
+# RUNSHARED uses cwd as LD_LIBRARY_PATH which contains target executable
+# code.  LDLIBRARYDIR can be passed from the receipe to point to native
+# (host executable) code.
+
+diff -Naur Python-2.6.1.orig/configure.in Python-2.6.1/configure.in
+--- Python-2.6.1.orig/configure.in	2009-02-26 00:24:41.000000000 +0100
++++ Python-2.6.1/configure.in	2009-02-26 00:34:32.000000000 +0100
+@@ -707,7 +707,7 @@
+     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ 	  LDLIBRARY='libpython$(VERSION).so'
+ 	  BLDLIBRARY='-L. -lpython$(VERSION)'
+-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	  RUNSHARED=LD_LIBRARY_PATH='${LDLIBRARYDIR}':${LD_LIBRARY_PATH}
+ 	  case $ac_sys_system in
+ 	      FreeBSD*)
+ 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
packages/python/python_2.6.1.bb +4 -7
index 57c64df..4ec9eae 100644
@@ -12,6 +12,7 @@ SRC_URI = "\
   file://04-default-is-optimized.patch;patch=1 \
   file://05-enable-ctypes-cross-build.patch;patch=1 \
   file://06-libffi-enable-default-mips.patch;patch=1 \
+  file://07-ld_library_path.patch;patch=1 \
   file://99-ignore-optimization-flag.patch;patch=1 \
   \
 # not yet pushed forward
@@ -41,17 +42,13 @@ do_compile_prepend() {
 	install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
 	install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
 	install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
-	install -m 0644 Makefile Makefile.orig
-	install -m 0644 Makefile Makefile.backup
-	sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
-	install -m 0644 Makefile Makefile.backup
-	sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
 	install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
 }
 
 do_compile() {
 	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+		LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \
 		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
@@ -61,6 +58,7 @@ do_compile() {
 
 	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+		LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \
 		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
@@ -73,10 +71,9 @@ do_stage() {
 }
 
 do_install() {
-	install -m 0644 Makefile.orig Makefile
-	
 	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+		LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
 		STAGING_LIBDIR=${STAGING_LIBDIR} \
 		STAGING_INCDIR=${STAGING_INCDIR} \
 		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
Signature · 1 line
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)