Page 1 of 2

Python-2.6.4 plus

Posted: Fri 20 Nov 2009, 05:36
by technosaurus
I packed Python in a few different ways.

Here is the primary package
http://puppy-development.googlecode.com ... 4-i486.pet

Python only 3.7Mb pet with just the python binary and .py files
<<This is how you should install it for personal use>>

Python plus PyGtk (and dependencies) 6.5MB sfs with .py files and .pyo files (with symlinks for .pyc files) this method will give faster startup times since python will just use the pyo files without having to compile the .py file (the symlink will just make it use the pyo file and not fill up your save file or RAM with all of the pyc files)
<<this is the best method for sfs distribution including remastering the pupXXX.sfs>>

Both are available here:
http://code.google.com/p/puppy-developm ... loads/list

Posted: Fri 20 Nov 2009, 05:46
by Lobster
Our favourite dinosaur strikes again :wink:

Both these methods are for running Python files?
Are they also suitable for programing Python in Geany or is a fuller version required?

Thanks technosaurus 8)

Posted: Fri 20 Nov 2009, 06:19
by technosaurus
Both should be full working versions - the big difference is that when you run Python with the pet your save file will grow slightly due to the automatically generated .pyc files from .py files that are called (or .pyo if you pass the -OO flag to python) The sfs already has the .pyo files and a symlink for .pyc which Python automatically detects and uses. This is so that it doesn't have to waste time compiling the bytecode on subsequent runs.

To keep the pyc and pyo files from being generated (and save space in the pet version) you can replace the python symlink to python2.6 with a script that has something like:

Code: Select all

#!/bin/sh
python2.6 -B $@

Posted: Fri 20 Nov 2009, 18:10
by technosaurus
I added a minimal pet with pycairo, pygobject, pygtk and pysqlite included. It includes the required py files libraries and files to build/test new python packages... the only thing that is removed is the 2to3 (python2 to python3) compatibility checks, but it is in the sfs if you really need it for development purposes.

I used the previous script to prevent them from filling up your save file.
To revert to normal operation and speed up your second run (by saving the compiled bytecode to your save file or RAM in pfix=ram mode), this will revert it to normal behavior

Code: Select all

ln -s -f /usr/bin/python2.6 /usr/bin/python
Or if you want it to always build optimized code, use:

Code: Select all

sed -i "s/python2.6 -B $@/python2.6 -O $@/g" /usr/bin/python
Or for optimized and "stripped code, use:

Code: Select all

sed -i "s/python2.6 -B $@/python2.6 -OO $@/g" /usr/bin/python

Posted: Fri 20 Nov 2009, 18:41
by technosaurus
I forgot to mention the differences between this version and the devx version:
  • multiprocessor support
    python2 to python3 translation helper
other new stuff
  • abstract base classes
    abstract syntax tree
    fractions
    generic path
    io
    numbers
    pydoc_topics
    ssl
missing:
deprecated gopherlib module

to see if it works try:

Code: Select all

/usr/lib/python2.6/webbrowser.py -n http://pupweb.org/desktop

Posted: Sat 21 Nov 2009, 21:13
by technosaurus
Update: added mercurial and bazaar (packaged with guis) to the first post.

Any big requests for other PyGtk pets while I have it installed?

Posted: Sun 29 Nov 2009, 06:19
by didik
Technosaurus,
How do you configure Python installation?

Posted: Sun 29 Nov 2009, 06:46
by sikpuppy
didik wrote:Technosaurus,
How do you configure Python installation?
With a snake charmer.

Posted: Mon 30 Nov 2009, 04:48
by technosaurus
see line 139 of /usr/lib/python2.6/config/Makefile

Posted: Fri 04 Dec 2009, 09:47
by neurino
technosaurus wrote:I added a minimal pet with pysqlite included.
Why pysqlite?
Isn't standard Python library included with default sqlite3 module???

Posted: Sun 27 Dec 2009, 01:27
by Dingo
Woof Woof

Trying to install

*PDFminer*
- http://www.unixuser.org/~euske/python/p ... tml#source

I downloaded your python packages, but when I try to install, an error is showed:

Code: Select all

# python setup.py install
running install
error: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)
# 

Posted: Sun 27 Dec 2009, 02:19
by technosaurus
That would have been in the DEV folder - I can pet it when I get back home after the holidays... or you can get the include files (*.h) straight from the python source package and put them in /usr/include.

Posted: Thu 04 Mar 2010, 05:44
by ttuuxxx
technosaurus wrote:That would have been in the DEV folder - I can pet it when I get back home after the holidays... or you can get the include files (*.h) straight from the python source package and put them in /usr/include.
ever get back from that holiday of yours lol
still no dev files, I was helping a forum member with adding python to gimp so the "Script-fu" Xtns would work and needed python and pythongtk, so I sent him a link to your package and it worked with the additional package below on 2.14X :)
So then I went to compile a python app and guess what no dev files, lol

Thanks for the python anyways it works on 2.14x :)
ttuuxxx

the plugin below should work with any gimp 2.4 series :)
plus your http://puppy-development.googlecode.com ... 4-i486.pet

hmmm also noticed you misspelled your package name, should never have spaces in packages names you get a % in the name when you do. http://puppy-development.googlecode.com/files/Python%2B-2.6.4-i486.pet
ttuuxxx

Posted: Thu 04 Mar 2010, 06:07
by technosaurus

Posted: Fri 05 Mar 2010, 05:07
by ttuuxxx
the package was missing 1 very important script, without it you can't compile gimp with python, below is the script. I altered it so it would work with this version :)
ttuuxxx

Posted: Mon 29 Mar 2010, 15:37
by charlie6
Hi technosaurus,
that's nice ! thanks !
...Python only 3.7Mb pet with just the python binary and .py files ...
I just wanted to know which wxPython version could be installed with Python2.6.4...and where to get an eventual existing lightweight compatible wxPython.pet?

Many thanks for any answer.
Cheers, Charlie

Posted: Tue 30 Mar 2010, 03:29
by technosaurus
just notice the %2b ttuuxxx refered to previously - it is from a "+" not a space - official gtk+ packages have one too if you right click and copy the link

do you have a link to the wx pet and the source tarball and dependencies that the WxPython page mentions?

Posted: Tue 30 Mar 2010, 07:40
by neurino
technosaurus wrote: do you have a link to the source tarball and dependencies that the WxPython page mentions?
wxpython download page:
http://www.wxpython.org/download.php#prerequisites

dependencies: glib and gtk+
optional: opengl or mesa3d for building wxGLCanvas (can be excluded in configure)

source tarball: http://downloads.sourceforge.net/wxpyth ... .1.tar.bz2

I reccomend to build it unicode not ascii.

Posted: Tue 30 Mar 2010, 17:23
by technosaurus
Looks like I am going to need wxwidgets as well - is there a semi-official version available that people are using, so we don't run in to version incompatibilities?

also is there a specific wxPython program request that would make a good test?

Posted: Tue 30 Mar 2010, 17:43
by ttuuxxx
technosaurus wrote:Looks like I am going to need wxwidgets as well - is there a semi-official version available that people are using, so we don't run in to version incompatibilities?

also is there a specific wxPython program request that would make a good test?
lol how about gnuradio
http://gnuradio.org/redmine/wiki/gnuradio
then you can hack it and have some fun
http://www.youtube.com/watch?v=-c2xcb21X2Q
ttuuxxx