Re: [ptxdist] Python packages
On Fri, Aug 22, 2008 at 01:19:46PM +0200, Robert Schwebel wrote: > On Fri, Aug 22, 2008 at 05:16:57AM -0600, Gary Thomas wrote: > > Perhaps you have a package that you could share the actual files for? > > One that's not in the SVN tree... > > > > I'll see what I can do with these ideas. > > We could add the latest libpv version to the tree. Michael, we must do > that for an upcoming project anyway, so please go ahead. Done. Please note setup.py is integrated with the autotools stuff in libpv. You will find the calls to setup.py in python/GNUmakefile.am in the libpv source code. Michael Olbrich -- Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
On Fri, Aug 22, 2008 at 05:37:07AM -0600, Gary Thomas wrote: >> Note, nevertheless, that my comments stay true even with the above. It >> somehow works, but is not reliable. > > Fair enough. I'm only interested in x86 -> PPC, so I should be OK. Hmm, please report back if it works for LE -> BE cases. We have only used it on x86 -> ARM-LE so far. So I'm definitely interested in your experiences. >> We could add the latest libpv version to the tree. Michael, we must do >> that for an upcoming project anyway, so please go ahead. > > I'd appreciate this a lot, thanks. Once I get the Cheetah > (and possibly others) package working, I can contribute them > back to the project. Yea, that would be really great! rsc -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
Robert Schwebel wrote: On Fri, Aug 22, 2008 at 05:16:57AM -0600, Gary Thomas wrote: This is a great start, thanks. Note, nevertheless, that my comments stay true even with the above. It somehow works, but is not reliable. Fair enough. I'm only interested in x86 -> PPC, so I should be OK. Perhaps you have a package that you could share the actual files for? One that's not in the SVN tree... I'll see what I can do with these ideas. We could add the latest libpv version to the tree. Michael, we must do that for an upcoming project anyway, so please go ahead. I'd appreciate this a lot, thanks. Once I get the Cheetah (and possibly others) package working, I can contribute them back to the project. -- Gary Thomas | Consulting for the MLB Associates |Embedded world -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
On Fri, Aug 22, 2008 at 05:16:57AM -0600, Gary Thomas wrote: > This is a great start, thanks. Note, nevertheless, that my comments stay true even with the above. It somehow works, but is not reliable. > Perhaps you have a package that you could share the actual files for? > One that's not in the SVN tree... > > I'll see what I can do with these ideas. We could add the latest libpv version to the tree. Michael, we must do that for an upcoming project anyway, so please go ahead. rsc -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
Michael Olbrich wrote: Hi, On Thu, Aug 21, 2008 at 03:03:04PM -0600, Gary Thomas wrote: I'd like to add a python package to my PTXdist tree. The key thing will be to run python setup.py install in the target-install step in such a way that any non-python pieces get built correctly. For example, trying to install Cheetah requires the use of the target GCC in order to build a [binary] wrapper. Ideas/help? in the compile stage: $(CROSS_ENV) PATH=$(CROSS_PATH) LDSHARED="$(CROSS_CC) -shared" \ python setup.py build The LDSHARED stuff is a hack. Without it setup.py picks the correct compiler from $(CROSS_ENV) but uses "gcc -shared" to link. The quotes will get lost at some point so "-shared" become a parameter for CROSS_CC. in the install stage: python setup.py install --prefix=$(SYSROOT)/usr in the targetinstall stage: @$(call install_copy, libpv, 0, 0, 0644, \ $(SYSROOT)/usr/lib/python2.4/site-packages/libfoo.so, \ /usr/lib/python2.4/site-packages/libfoo.so) for all libs. It's not perfect but it should work. This is a great start, thanks. Perhaps you have a package that you could share the actual files for? One that's not in the SVN tree... I'll see what I can do with these ideas. -- Gary Thomas | Consulting for the MLB Associates |Embedded world -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
Hi, On Thu, Aug 21, 2008 at 03:03:04PM -0600, Gary Thomas wrote: > I'd like to add a python package to my PTXdist tree. The > key thing will be to run > python setup.py install > in the target-install step in such a way that any non-python > pieces get built correctly. For example, trying to install > Cheetah requires the use of the target GCC in order to build > a [binary] wrapper. > > Ideas/help? in the compile stage: $(CROSS_ENV) PATH=$(CROSS_PATH) LDSHARED="$(CROSS_CC) -shared" \ python setup.py build The LDSHARED stuff is a hack. Without it setup.py picks the correct compiler from $(CROSS_ENV) but uses "gcc -shared" to link. The quotes will get lost at some point so "-shared" become a parameter for CROSS_CC. in the install stage: python setup.py install --prefix=$(SYSROOT)/usr in the targetinstall stage: @$(call install_copy, libpv, 0, 0, 0644, \ $(SYSROOT)/usr/lib/python2.4/site-packages/libfoo.so, \ /usr/lib/python2.4/site-packages/libfoo.so) for all libs. It's not perfect but it should work. mol -- Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Python packages
On Thu, Aug 21, 2008 at 03:03:04PM -0600, Gary Thomas wrote: > I'd like to add a python package to my PTXdist tree. The > key thing will be to run > python setup.py install > in the target-install step in such a way that any non-python > pieces get built correctly. For example, trying to install > Cheetah requires the use of the target GCC in order to build > a [binary] wrapper. > > I don't see any examples of how to do this. The closest thing > is myghty (sorely out of date BTW), but it merrily glosses > over the target install. Cross compiling python is a huge mess; we have somehow managed to cross build it + myghty, but it is in no way sane and for example doesn't work on 64 bit build host + 32 bit target. Patches are welcome... rsc -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 -- ptxdist mailing list ptxdist@pengutronix.de
[ptxdist] Python packages
I'd like to add a python package to my PTXdist tree. The key thing will be to run python setup.py install in the target-install step in such a way that any non-python pieces get built correctly. For example, trying to install Cheetah requires the use of the target GCC in order to build a [binary] wrapper. I don't see any examples of how to do this. The closest thing is myghty (sorely out of date BTW), but it merrily glosses over the target install. Ideas/help? Thanks -- Gary Thomas | Consulting for the MLB Associates |Embedded world -- ptxdist mailing list ptxdist@pengutronix.de