Tiny Core Linux

Tiny Core Extensions => TCE News => TCE 2.x => Topic started by: Jason W on August 21, 2009, 10:09:06 PM

Title: python-testing
Post by: Jason W on August 21, 2009, 10:09:06 PM
This is python built with tk, openssl, sqlite, and bsddb support.  Only as full package and in tcz form for now for testing.  Will split it up and make tce if there are no issues.  Make sure you don't have python, python-devs, or python-minimal installed when you install this one.  This package creates the /usr/local/tce.installed/python file so it will be recognized by the appbrowser as fulfilling the python dependency for extensions dependent on python.

Code: [Select]
Title:          python-testing.tczl
Description: Python programming language.
Version:        2.5.2
Author:         Python Software Foundation.
Original-site:  http://www.python.org/
Copying-policy: Python license: http://www.python.org/psf/license
Size: 11M
Extension_by:   Jason W
Comments:       Main python package.
                ----------
Change-log:     2008/07/23 First version
                2008/12/11 Rebuilt for i486, size, cramfs.
2009/03/26 Placed /usr/local/lib/python2.5/site-packages
in the module path.
Current: 2009/08/21 Built with openssl, bssdb, sqlite, and tk support. and
replaced user.tar.gz with scripting.
Title: Re: python-2.6.2-testing
Post by: Jason W on August 25, 2009, 10:03:34 PM
Here is the new python-2.6.2-testing with sqlite, tk, and openssl support enabled.  Python-bsddb will be a seperate extension from a seperate source.  This is for the rebuilding of python dependent extensions only, do not use on your normal system.  The extensions built against python - pyqt, pygtk, etc - will be rebuilt against this.

Code: [Select]
Title:          python-2.6.2-testing.tczl
Description: Python programming language.
Version:        2.6.2
Author:         Python Software Foundation.
Original-site:  http://www.python.org/
Copying-policy: Python license: http://www.python.org/psf/license
Size: 13M
Extension_by:   Jason W
Comments:       Main python package.
                ----------
Change-log:     2008/07/23 First version
                2008/12/11 Rebuilt for i486, size, cramfs.
2009/03/26 Placed /usr/local/lib/python2.5/site-packages
in the module path.
Current: 2009/08/26 Built with openssl, sqlite, and tk support. and
replaced user.tar.gz with scripting.
Title: Re: python-testing
Post by: robc on August 26, 2009, 04:54:56 PM
the path to the python libs are set to /tmp/tcloop/python-2.6.2-testing/usr/local/lib/python2.6 instead of /usr/local/lib/python2.6
This causes python to not find modules that are installed in /usr/local/lib/python2.6 where they should be installed.

A work around is to declare PYTHONPATH before using the modules i.e.: `export PYTHONPATH=/usr/local/lib/python2.6`
Title: Re: python-testing
Post by: Jason W on August 26, 2009, 05:18:09 PM
Ok, I think I had this figured out for the original python, I will review and change what needs to be for this one.
Title: Re: python-testing
Post by: Jason W on August 26, 2009, 06:38:21 PM
There was a typo in the startup script, fixed now.

The python files in /usr/local/bin have to be copied over as real files to set the right paths. They only take up about 23kb.
Title: Re: python-testing
Post by: Jason W on August 26, 2009, 06:48:59 PM
While on the subject, here is a brief list of extensions that will need rebuilding.  I will do pygobject, pygtk, pyogg-vorbis and pycairo.  Please mention any more that will need a rebuild due to this update.

vte
pyqt
pygtk
pycairo
pygobject
pyogg-vorbis
pysqlite2
psyco

As the extensions are rebuilt, submit them as usual and I will place them in a directory on ibiblio so they can be downloaded and tested.  I don't want to upload anything else to the repo until the all the stuff is rebuilt, tested and ready to replace the current versions.
Title: Re: python-testing
Post by: robc on August 26, 2009, 07:12:26 PM
I am doing pyqt right now.

I had to rebuild sip

some other maybes that I will rebuild if needed:
bitbake
recordmydesktop-gtk
treeline
psyco
Title: Re: python-testing
Post by: bmarkus on August 27, 2009, 02:33:05 AM
I will recompile vte in the next days. BTW, vte extension in fact contains two programs, vte and vtemodule. First is used by applications like Terminal, second is a Python module. vte has nothing to do with vtemodule, I will separate them.
Title: Re: python-testing
Post by: bmarkus on August 27, 2009, 05:46:47 AM
vte.tcel/vte.tczl is submitted. Python module is moved to a separated extension, vte is now Python independent.
Title: Re: python-testing
Post by: Jason W on August 27, 2009, 07:29:47 AM
Great, I will upload them tonite.  Here is where the python related extensions will be stored for now:

http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tce/src/python-update/
Title: Re: python-testing
Post by: Kingdomcome on August 27, 2009, 02:03:45 PM
I have a couple newbie questions about libraries inside python modules.  for instance, in pysqlite2 there is a "/usr/local/lib/python2.x/site-packages/pysqlite2/_sqlite.so".  Q1: Do these libraries require ldconfig to be run?  Q2:  If so, how would this be automated in our current system? Maybe a post-install script to edit /etc/ld.so.conf and run ldconfig?  I have googled for only a short time and did not find anything relevant.  The reason I ask is because I am going to take the liberty of creating the pysqlite2 extension for python2.6 since juanito is on vacation :)
Title: Re: python-testing
Post by: Jason W on August 27, 2009, 02:33:24 PM
I am pretty sure that those .so files in the site-packages directory do not need ldconfig, at least that is the case with pygtk.  I believe python deals with those.
Title: Re: python-testing
Post by: Jason W on August 27, 2009, 09:40:44 PM
These extensions are now in the python-update area mentioned above for those who would like to help test with python-2.6.2:

bitbake
psyco
pybsddb
pygobject
pycairo
pyqt
sip
treeline
vte
vtmodule

Title: Re: python-testing
Post by: bmarkus on August 28, 2009, 03:16:32 AM
These extensions are now in the python-update area mentioned above for those who would like to help test with python-2.6.2:

...
vte
vtmodule


vte has nothing to do with Python now, it must be moved to the ordinary repository. It works fine without Python, tested on TC 2.2 with the Xfce Terminal application. It is safe to replace current version as it is not only separated from its Python part but version upgraded too.

vtemodule is the Python interface for vte, compiled for 2.6.2
Title: Re: python-testing
Post by: Jason W on August 28, 2009, 05:38:34 AM
So you want me to remove the current vte which has python module and replace it with the new vte which does not? Making the python module unavailable?
Title: Re: python-testing
Post by: bmarkus on August 28, 2009, 05:53:53 AM
So you want me to remove the current vte which has python module and replace it with the new vte which does not? Making the python module unavailable?

Yes, and keep vtemodule here till 2.6.2 will be official and moved to the main repository. Actually I do not aware any application in the repo using vtemodule, its existence is just a side effect :)

To be serious, please mocve vte to main. If somone will claim the missing vtemodule he will find it here.
Title: Re: python-testing
Post by: JoXo009 on August 28, 2009, 05:57:36 AM

When offering the new python 2.6 extension please take in consideration to offer a python 2.5 extension too.

In principle different python versions can be used in parallel, so I hope two different extensions can coexist side by side.

Anyway a python 2.5 version is needed. Important applications as Google Appengine rely on python 2.5 and don't work with python 2.6*.


Maybe the python 2.5 version even could be updated for ssl and sqlite support.

____________
* see fourth paragraph: 'App Engine supports Python 2.5'
http://code.google.com/appengine/docs/python/overview.html
To my experience this statement has to be read as 'Don't try a newer python version, if you don't want to ruin your results.'
Title: Re: python-testing
Post by: bmarkus on August 28, 2009, 06:04:23 AM

When offering the new python 2.6 extension please take in consideration to offer a python 2.5 extension too.

In principle different python versions can be used in parallel, so I hope two different extensions can coexist side by side.

Anyway a python 2.5 version is needed. Important applications as Google Appengine rely on python 2.5 and don't work with python 2.6*.


Maybe the python 2.5 version even could be updated for ssl and sqlite support.

____________
* see fourth paragraph: 'App Engine supports Python 2.5'
http://code.google.com/appengine/docs/python/overview.html
To my experience this statement has to be read as 'Don't try a newer python version, if you don't want to ruin your results.'

Did you try it with 2.6 ? This statement above says only it works with 2.5 but do not say doesn't work with 2.6 For me it says only that it was built and tested on 2.5 which was the version available that time and ofiicially not tested with 2.6

Title: Re: python-testing
Post by: JoXo009 on August 28, 2009, 06:10:21 AM
> Did you try it.

Yes, see my above footnote.

Or ask nickjohnson on the official appengine #freenode channel.
Title: Re: python-testing
Post by: bmarkus on August 28, 2009, 06:20:48 AM
> Did you try it.

Yes, see my above footnote.

Or ask nickjohnson on the official appengine #freenode channel.

I trust you :)

My advice is to make 2.6.2 official and make 2.5.2 available for those need for backward compatibility.
Title: Re: python-testing
Post by: bmarkus on August 28, 2009, 06:35:59 AM

Anyway a python 2.5 version is needed. Important applications as Google Appengine rely on python 2.5 and don't work with python 2.6*.


BTW, thanks for mentioning Google Appengine, I didn't know it. Looks really interesting.
Title: Re: python-testing
Post by: Jason W on August 28, 2009, 07:55:42 AM
The current python will be renamed python-2.5.2 and still be available in the repo.  It will be the one built with ssl, sqlite, and tk support.   Pygtk I should get to tonite, and with some other python related submissions that are waiting in the gmail account, we are close to being ready for final testing and replacement.  I will move vte to the repo and the waiting python extensions in the queue to storage when I get home tonight.

Thanks to everyone involved for your quick work on this.  
Title: Re: python-testing
Post by: Jason W on August 29, 2009, 09:53:41 AM
dbus-python will need rebuilding, as well as wicd.  Juanito, I can do dbus-python if you are occuppied now.  I built wicd but there were issues finding the gobject module when running the app.  Time is tight for me right now so I didn't get to troubleshoot and find the issue, but with those two extensions rebuilt that should get us pretty close to completion.

JLS - I can do wicd if you are not able to, but if you could rebuild it that would be a big help.
Title: Re: python-testing
Post by: Juanito on August 29, 2009, 09:59:41 AM
I'll be able to re-do dbus-python in the next couple of days
Title: Re: python-testing
Post by: robc on August 31, 2009, 01:22:57 PM
pygobject needs libffi in its dep file
and pygobject-dev will need libffi-devs
Title: Re: python-testing
Post by: Jason W on August 31, 2009, 05:03:23 PM
Thanks, will add it in.
Title: Re: python-testing
Post by: Juanito on September 01, 2009, 09:18:07 AM
dbus-python uploaded
Title: Re: python-testing
Post by: Jason W on September 01, 2009, 09:18:34 AM
I also found an error in pygoject.  WIll fix that soon.
Title: Re: python-testing
Post by: Jason W on September 01, 2009, 09:23:11 AM
It looks like wicd is the only package that will be broken by this update. I aim to correct pygobject and have everything copied over by sometime tomorrow.  Wicd will need to be rebuilt, or another version from Debian repackaged that uses python 2.6. 
Title: Re: python-testing
Post by: Kingdomcome on September 01, 2009, 12:00:58 PM
Jason,

   Did you receive my three updates dated Aug 28? pysqlite2, SQLAlchemy, and dictclient.  I do not see them in the python-update folder yet.  If you didnt receive, I can resend.

Kingdomcome
Title: Re: python-testing
Post by: Jason W on September 01, 2009, 12:36:11 PM
I even sent a confirmation that I had uploaded them, but I could have been interrupted in the process of handling them.  They are there now.
Title: Re: python-testing
Post by: Jason W on September 01, 2009, 02:49:09 PM
zenmap and wicd both need the older python and pygtk stack.  As far as I know those two extensions are the only ones left that will be affected by python update.  I will wait until tomorrow for any discussion related to these two extensions.  I was pondering the idea of renaming the current pygtk type stuff to pygtk-2.5.2 to allow use of the current python 2.5.2 apps, but that would make it confusing and break extensions if any current pygtk type of apps are installed along side the older ones.  We have to cleanly move forward, but I would be happy to wait a little longer for zenmap and wicd to be updated before the new python is copied over.  We will have python-2.5.2 available, but pygtk apps have to be built against the new python.
Title: Re: python-testing
Post by: Juanito on September 01, 2009, 11:13:20 PM
I'll look at zenmap in the next day or two.
Title: Re: python-testing
Post by: Juanito on September 02, 2009, 09:21:28 AM
pygobject needs libffi in its dep file
and pygobject-dev will need libffi-devs

Hmm - I didn't read this before re-compiling zenmap and sure enough (even though it didn't require libffi to compile) it would not run due a lack of libffi.

pygobject did not used to have libffi as a dep, is this a new requirement of an updated version or was it disabled with a configure switch before?
Title: Re: python-testing
Post by: Juanito on September 03, 2009, 03:00:18 AM
zenmap uploaded
Title: Re: python-testing
Post by: Jason W on September 03, 2009, 06:29:14 AM
Thanks.  I also uploaded python-2.5.2, will announce soon.

Libffi is not listed as a dep for Arch or Gentoo, I will recompile soon without libffi installed.

Last call for wicd.  There is no way to preserve it in it's present form as only one version of pygtk can be installed at one time - but please let me know if I am wrong.  I will start moving the python stuff to the repo very soon.
Title: Re: python-testing
Post by: Kingdomcome on September 03, 2009, 12:45:07 PM
I made a little script to download all the deps from the repo and check them for current python dependency.
Here is the full list:
Code: [Select]
SQLAlchemy.tcz
bitbake.tczl
dbus_python.tczl
dictclient.tcz
gramps-locale.tcz
gramps.tcz
hplip.tczl
libglade-devs.tcz
mercurial-1.2.1.tczl
nicotine.tcz
pil.tczl
psyco.tczl
pycairo.tczl
pygobject.tczl
pygtk.tczl
pyqt.tczl
pysqlite2.tcz
pysqlite2.tczl
python-devs.tczl
recordmydesktop-gtk.tczl
sip.tczl
treeline.tczl
wicd.tcz
wifi-radar.tcz
zenmap.tczl

Checking against the contents of the python-update folder, it looks like we have almost all of them recompiled against python-2.6.2.  This is great work everyone. The extensions not yet recompiled are:
Code: [Select]
hplip.tczl
libglade-devs.tcz
mercurial-1.2.1.tczl
nicotine.tcz
pil.tczl
wicd.tcz
wifi-radar.tcz
nicotine and and wicd (as Jason already mentioned) are the only 2 left with a pygtk dependency.

Question:  Do we intend to keep the python-2.5 dependent extensions in the repo as well? and if so, has there been a decision on a naming scheme?
Title: Re: python-testing
Post by: bmarkus on September 03, 2009, 01:03:07 PM
WICD 1.6.2.1 INSTALL file says at the beginning:

Quote
Installation of Wicd should be done using your distribution package if one
exists.  If not, the installation is relatively straightforward, but there
are a few dependencies:
  1. python (>=2.4, <3.0)
  2. pygtk (>=2.10)
  2. dbus and its glib and python bindings
  3. a dhcp client (dhclient, dhcpcd, and pump are supported)
  4. wireless-tools (iwlist, iwconfig, etcetera)
  5. net-tools (ip, route, etcetera)
  6. a graphical sudo application (gksu, kdesu, and ktsuss are supported),
     while optional, is strongly recommended
  7. urwid (if you want to use the curses client - needs version >=0.9.8.3)
  8. pm-utils (optional for suspend/resume integration)
     Wicd supports using versions >=1.2.4 -- earlier versions may work just
     fine, but they are completely unsupported here.

This WICD version was released on August 27. I did not try to compile it with Python 2.6.2 but it must be OK.
Title: Re: python-testing
Post by: Jason W on September 03, 2009, 01:44:50 PM
Python 2.5 is now in the repo as python-2.5.2, built with ssl, tk, and sqlite support.  The .dep files for most python dependent packages can be changed to reflect python-2.5.2.  I will make that change in the dep files maybe tonite.

Nicotine and Wicd are JLS's extensions, I am waiting for him to have a chance for input in rebuilding those packages.  I will send him a pm.

Thanks to everyone's quick action, this python upgrade is happening quick and looks like it will be smooth.

Title: Re: python-testing
Post by: Jason W on September 04, 2009, 12:46:41 PM
Everything is set to go.  I will be rebuilding nicotine and wicd, but first I will adjust the dep files of the extensions that depend on python (that were not recompiled with the new version) so they will use python-2.5.2.  Then I will replace python with the new version, and copy over the rebuilt apps.  Hopefully all will go smoothly without any breakage of the repo.

Title: Re: python-testing
Post by: Kingdomcome on September 04, 2009, 01:38:19 PM
Good luck with this Jason and thanks for the work.  Will you also be adjusting the info files to show the new python extension names? I assume the 2.6 will also get a name change dropping the "-testing".  If it would be easier for us to submit updated extensions with infos and deps fixed, I would be more than happy to recompile mine.  Just offering.
Title: Re: python-testing
Post by: Jason W on September 04, 2009, 01:55:47 PM
I have split 2.6.2 into the python/python-dev/python-minimal extensions and they will be the standard python.  The dep files of the extensions not built against the new python will simply have their dep files updated to show python-2.5.2.  I will adjust the dep and info files of the extension that were built against python-2.6.2-testing.

The extensions that use the old python can be updated to use 2.6.2 at any time, but it is not necessary.  Hopefully I can do all of this tonight except for rebuilding wicd and nicotine.  I will just have to pull them temporarily and upload them when I can rebuild and test them. 

Don't worry about resending anything, I will adjust the dep and info files to reflect the correct python name.
Title: Re: python-testing
Post by: Jason W on September 04, 2009, 08:14:19 PM
Wifi-radar is one more pygtk app that would need rebuilding.

But I see now that two versions of dbus_python can be installed at one time as it installs into site-packages, so hplip is preserved along with dbus_python-2.5.2.

Title: Re: python-testing
Post by: Jason W on September 04, 2009, 11:39:27 PM
All finished but for nicotine and wicd.  Bitbake does not want to work as I tested, but all the others built against new python seem to work ok. I will leave nicotine and wicd up for now so they could be used as an example for a rebuilt version.  I will get to it when I can, but anyone is of course welcome to rebuild and submit them in the mean time.

Thanks again for everyone's effort in this.

Title: Re: python-testing
Post by: robc on September 05, 2009, 12:21:37 AM
I'll fix bitbake, it may take a few days for me to get around to it
Title: Re: python-testing
Post by: bmarkus on September 05, 2009, 12:57:20 AM

Wifi-radar is one more pygtk app that would need rebuilding.


Will take care during the weekend.
Title: Re: python-testing
Post by: Jason W on September 05, 2009, 07:36:19 AM
Thanks.  In time I will split the python package from it's dev files like the one before as well.
Title: Re: python-testing
Post by: Jason W on September 06, 2009, 12:53:04 PM
I just rebuilt nicotine and will upload in a moment, but I noticed something that we need to do in order for python apps to work smoothly in the case of both versions of python being in the system at one time.  The python scripts that launch apps such as nicotine need their shebang to point to the right version of python and not just /usr/local/bin/python as they do by default.  Depending on the version of python the app uses, the line should read:

#!/usr/local/bin/python2.6         for the current python

#!/usr/local/bin/python2.5         for python-2.5.2


The symlink /usr/local/bin/python will use the version of python that gets installed first, so it is not what needs to get invoked.

I can go through the apps and see what needs to be adjusted and make the adjustments. 
Title: Re: python-testing
Post by: bmarkus on September 06, 2009, 01:32:08 PM

The symlink /usr/local/bin/python will use the version of python that gets installed first, so it is not what needs to get invoked.


I would suggest to remove the symlink (creation) from 2.5.2 extension and let 2.6.2 to create it. If an application need explicitly 2.5.2 lets change the application. All others will be fine with #!/usr/local/bin/python symlinked to #!/usr/local/bin/python2.6    
Title: Re: python-testing
Post by: Jason W on September 06, 2009, 01:59:56 PM
That'll be better.  I will adjust the python-2.5.2 dependent apps and we can leave new ones alone.  And remove the /usr/local/bin/python file from the 2.5.2 extension.
Title: Re: python-testing
Post by: Jason W on September 06, 2009, 03:10:11 PM
/usr/local/bin/python has been removed from the python-2.5.2 package, and it's dependent apps that call on /usr/local/bin/python have been adjusted to /usr/local/bin/python2.5. 

Title: Re: python-testing
Post by: bmarkus on September 07, 2009, 03:36:16 AM

Wifi-radar is one more pygtk app that would need rebuilding.


Will take care during the weekend.

Tested wifi-radar with the current 2.6.2 Python and related programs in the repository. It works fine, no need to recompile.

The only issue is the missing pygtk.tcel/pygtk.tczl in the .dep files

Jason: may I ask you to fix it?
Title: Re: python-testing
Post by: Jason W on September 07, 2009, 08:17:16 AM
Sure.
Title: Re: python-testing
Post by: jls on September 07, 2009, 12:33:19 PM
also the pil extension needs to be rebuilt
Title: Re: python-testing
Post by: Juanito on September 07, 2009, 02:29:34 PM
It's on the list once I re-build cups, hplip, etc...
Title: Re: python-testing
Post by: Jason W on September 07, 2009, 05:46:46 PM
JLS-
Pil has had it's deps adjusted to python-2.5.2 and it's shebangs pointing to python2.5.  It works on my machine.  Have you tried deleting you existing pil extension in your tce directory and redownloading?  It should work.
Title: Re: python-testing
Post by: jls on September 07, 2009, 06:44:12 PM
I'm trying to see if a program called tucan works on tc, it needs pygtk and pil and other thinghs, u mean I have to install both python 2.5.2 and 2.6.2?
Title: Re: python-testing
Post by: jls on September 07, 2009, 07:04:57 PM
I got an error that says python cannot recognise the image format for
Code: [Select]
self.set_icon_from_file(cons.ICON_TUCAN)
/usr/local/share/tucan/media/tucan.svg 
Title: Re: python-testing
Post by: Jason W on September 07, 2009, 07:06:38 PM
Ok, I see the delimma.  In that case pil would need to be built against 2.6.2, which Juanito said he is working on.