OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Creating Python 2.4 Zaurus Image, What extra modules are a "must"
kopsis
post Jan 5 2005, 01:15 PM
Post #1





Group: Members
Posts: 329
Joined: 1-July 04
Member No.: 3,880



I decided the shiny new Cacko 1.22 ROM on my Z needed a shiny new version of Python to go with it, so I'm building up a new Zaurus Python image with Python 2.4. I have the base Python image built and working and it includes all the "standard" Python modules (with the exception of crypt and nis for which I'm still missing libraries) including distutils, encodings, curses, readline, xml, etc.

In addition to the ext2 format, I'll also be releasing this new Python image as a cramfs for folks that want to run off SD (or internal flash) without chewing up so much space. Its not easy for folks to add stuff to the cramfs image on their own, so before I package it up, I'd like to find out if there are any "site-packages" that people think are critical to doing Python on the Z. The obvious ones (to me) are PyQT and pysqlite so I'll be including those. If there's anything else you'd like to see (that won't bloat things up too much), now's the time to ask.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Bertram Wooster
post Jan 11 2005, 12:06 PM
Post #2





Group: Members
Posts: 39
Joined: 18-December 04
From: Germany
Member No.: 5,957



it's definitely worth a try, though i'd be thankful for your "semi-detailed instructions"- i'm not new to computers however to linux and especially unix commands are quite unknown to me.
Go to the top of the page
 
+Quote Post
Ragnorok
post Sep 17 2005, 09:49 AM
Post #3





Group: Members
Posts: 298
Joined: 27-October 03
From: Greenfield, NH
Member No.: 781



QUOTE(Bertram Wooster @ Jan 11 2005, 08:06 PM)
it's definitely worth a try, though i'd be thankful for your "semi-detailed instructions"- i'm not new to computers however to linux and especially unix commands are quite unknown to me.
*

- Just did this and it's pretty simple. Thanks kopsis, for putting this thing together. Beats installing all of that stuff separately!!

- Naturally you must have an ext2 file system available. My SD is ext2; since it never comes out of Hiroshi I don't care if it's not compatible with another device. I mount it from the Z when I need to move data around.
- I just looked at the /etc/rc.d/init.d/mntpython script to see it wanted to mount it to /opt/QtPalmtop/lib/python2.4. Farther down you'll find an fsck.ext2 command, then after that a mount command to mount file system using a loop. Take note of these commands. The Z has two loop devices already, so unless you're using them for something else, you won't have to wory about the lines that create a bunch of loop devices. If both of your loops are busy you'll have to make another one.
- I created a place on the SD to hold the python directory. Since it's going to be linked to /opt/QtPalmtop/lib, I used /usr/mnt.rom/card/QtPalmtop/lib/python2.4. Anywhere will work just fine ... simply create a directory.
- Just 'cause, I ran the fsck to be sure the python24.ex2 wasn't corrupted, which is what it does each time it mounts.
- Then I created a temporary dir to mount it to, since the final "resting" place has to be the /opt...lib dir above. I used /home/zaurus/mnt, but anything writable that's not the lib dir above should work fine.
- Use the noted loop mount command, substituting the location of python24.ex2 for $IMAGEDIR/file and the temporary mount point for $PYTHONDIR.
- cp -R <mnt point>\python2.4 <dest dir>. For my example, <mnt point> is /home/zaurus/mnt and <dest dir> is /usr/mnt.rom/card/QtPalmtop/lib/python2.4, just to be painfully explicit. (grin)
- The odd thing is this actually puts stuff in <dest dir>\mnt. I could have copied it down one directory, but I was feeling lazy, so I just linked to there.
- cd /opt/QtPalmtop/lib
- ln -s <dest dir>\mnt python2.4
- umount <mnt point>
- rmdir <mnt point> (only if you want to ... I created it just to mount this .ex2 so I deleted it when I was done)
- rm <path to>\python24.ex2. You don't need this any longer because it' on your SD card in <dest dir>\mnt now.
- You can delete mntpython, or just uncomment the exit 0 at the beginning, which is what I did. If you don't prevent this from running you'll get errors next reboot.
- Run the Hello World example from the installation instructions. Also, type "help()" and press Enter. If it loads help, you know you're golden ... if there were errors but it still gets a python command prompt, the Hello World will still work but it won't load help.
- Enjoy your new kopsis-provided python 2.4 installation.

- I've had very good results moving binaries and libraries to wherever and linking them back to where they started. I haven't done this with python yet, but I certainly will be. Just move python-exe from /home/QtPalmtop/bin to /mnt/card/QtPalmtop/bin and "ln -s" to "put it back". Nethack is the only thing I've seen that fails with this treatment, so even if you have to install to "Internal", it doesn't have to stay there. I have tons of free space because I don't let stuff live there forever. If it doesn't work ... no biggie ... just remove the link and move it back! This is Linux, not Winbloze, and it simply won't care.

- The entire reason I did this is to get gnome-sudoku to run. I scoured the web fo Sudoku generators and this is the only thing I found. Tons of *solvers*, but no generators/players for the Z at all. Gnome-sudoku is written in python, and kopsis so very conveniently provided this package for the latest version.
- I'm going to play with it today.

- Hope this helps...
Go to the top of the page
 
+Quote Post

Posts in this topic
kopsis   Creating Python 2.4 Zaurus Image   Jan 5 2005, 01:15 PM
LarsAC   Would the mySQL API for Python fit into this, too?...   Jan 7 2005, 01:33 AM
fpp   Does this mean than when using the cramfs version,...   Jan 7 2005, 04:00 AM
kopsis   QUOTE(LarsAC @ Jan 7 2005, 04:33 AM)Would the...   Jan 7 2005, 05:45 AM
kopsis   QUOTE(fpp @ Jan 7 2005, 07:00 AM)Does this me...   Jan 7 2005, 05:57 AM
clofland   Sounds great! I've been waiting for 2.4 fo...   Jan 7 2005, 11:20 AM
fpp   Thanks for both clarifications kopsis ! I...   Jan 7 2005, 01:21 PM
clofland   One quick add: Isn't squashfs "better...   Jan 10 2005, 07:31 AM
kopsis   squashfs is a bit better than cramfs, but that wou...   Jan 10 2005, 09:53 AM
gasolin   Dear kopsis: Very appreciate for your python imag...   Jan 10 2005, 02:07 PM
kopsis   The palmdb module sounds like a great idea! I...   Jan 10 2005, 04:04 PM
Bertram Wooster   dear kopsis, thanks for all your work! do you ...   Jan 11 2005, 03:55 AM
kopsis   QUOTE(Bertram Wooster @ Jan 11 2005, 06:55 AM...   Jan 11 2005, 05:13 AM
Bertram Wooster   it's definitely worth a try, though i'd be...   Jan 11 2005, 12:06 PM
Ragnorok   QUOTE(Bertram Wooster @ Jan 11 2005, 08:06 PM...   Sep 17 2005, 09:49 AM
LarsAC   QUOTE(kopsis @ Jan 11 2005, 12:04 AM)But thos...   Jan 11 2005, 12:42 PM
kopsis   Connections to a remote MySQL database should work...   Jan 11 2005, 02:01 PM
LarsAC   BTW, would this only work on Cacko or other ROMs (...   Jan 12 2005, 02:49 AM
kopsis   I'm testing on a C760 running Cacko 1.22 and a...   Jan 12 2005, 04:58 AM
slapout   I'm using kopsis's Python 2.3 image on a 5...   Jan 12 2005, 11:16 AM
vernm   I just got my 5600 last week. It is great, but I h...   Jan 12 2005, 04:37 PM
kopsis   You can read up on my approach to Python on the Z ...   Jan 13 2005, 04:40 AM
rjohnson1969   QUOTE(kopsis @ Jan 13 2005, 06:40 AM)You can ...   May 10 2007, 01:58 PM
hughsieman   Hi I have installed your python image kopsis and ...   Jun 16 2007, 05:39 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th May 2013 - 05:25 AM