Python-2.6.4 plus

Miscellaneous tools
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Python-2.6.4 plus

#1 Post 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
Last edited by technosaurus on Sat 21 Nov 2009, 19:52, edited 4 times in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post 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)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post 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 $@
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#5 Post 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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#6 Post 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?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
didik
Posts: 44
Joined: Mon 05 Jan 2009, 10:34
Location: Bandung, Indonesia
Contact:

#7 Post by didik »

Technosaurus,
How do you configure Python installation?

User avatar
sikpuppy
Posts: 415
Joined: Sun 29 Mar 2009, 05:54

#8 Post by sikpuppy »

didik wrote:Technosaurus,
How do you configure Python installation?
With a snake charmer.
ASUS A1000, 800Mhz PIII Coppermine!, 192Mb RAM, 10Gb IBM Travelstar HDD, Build date August 2001.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#9 Post by technosaurus »

see line 139 of /usr/lib/python2.6/config/Makefile
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#10 Post by neurino »

technosaurus wrote:I added a minimal pet with pysqlite included.
Why pysqlite?
Isn't standard Python library included with default sqlite3 module???

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#11 Post 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)
# 
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#12 Post 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.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#13 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#14 Post by technosaurus »

Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#15 Post 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
Attachments
pygtk-codegen-2.pet
(464 Bytes) Downloaded 1313 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#16 Post 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

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#17 Post 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?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#18 Post 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.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#19 Post 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?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#20 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

Post Reply