Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Minimal Python installation?

Reply
Thread Tools

Minimal Python installation?

 
 
Thomas Troeger
Guest
Posts: n/a
 
      05-21-2008
Hi,

I'd like to put the python library and interpreter on a small embedded
Linux x86 compatible device where disk space is an issue. I played
around with the minimal Python interpreters, but was not entirely happy
with them, so my question is, is there an (preferably easy) way to put
the interpreter and a cut-down version of the python library/modules
that ship with regular Python into a new archive that I can safely copy
and use? My current method is to copy the python interpreter and the
python shared library to the device. Then I create a tar archive with
all startup files from the site package directory to my archive using
the following one-liner:

strace -f -eopen python -c 'pass' 2>&1 | grep -v ENO | grep '\.py' | awk
'BEGIN { FS="\"" } { print $2 }' | tar cvf x.tar -T -

This effectively packs all python library files that are accessed upon
startup into a tar archive. But I figure this method is not what I want
because there surely are files I am missing here (for example which are
accessed when starting a script), and what I really want is a minimal
environment that works. Let's say I want a complete Python install, but
without all the batteries

Any pointers?

Regards,
Thomas.
 
Reply With Quote
 
 
 
 
Paul Boddie
Guest
Posts: n/a
 
      05-21-2008
On 21 Mai, 12:07, Thomas Troeger <(E-Mail Removed)>
wrote:
>
> I'd like to put the python library and interpreter on a small embedded
> Linux x86 compatible device where disk space is an issue. I played
> around with the minimal Python interpreters, but was not entirely happy
> with them, so my question is, is there an (preferably easy) way to put
> the interpreter and a cut-down version of the python library/modules
> that ship with regular Python into a new archive that I can safely copy
> and use?


Perhaps there are some projects on the following pages which may help
in some way:

http://wiki.python.org/moin/EmbeddedPython
http://wiki.python.org/moin/Tiny_Python

[...]

> Let's say I want a complete Python install, but without all the batteries


I think there's an overlap between "installer" tools and some of the
projects mentioned on the above pages, especially where retaining only
the critical libraries in the resulting distribution is concerned.

Paul
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSON Template: Minimal but powerful templating language implementedin Python and 3 other languages Andy Chu Python 1 04-17-2009 07:59 AM
build minimal python 2.6 on linux r Python 2 11-23-2008 10:32 AM
Minimal Linux system to run Python Chaz Ginger Python 2 04-14-2007 08:09 PM
Minimal distro requirements for standalone python program.... jeuxal_com Python 2 03-02-2004 03:22 PM
Installing a python program without full distribution - minimal requirements... jeuxal_com Python 2 03-01-2004 10:00 AM



Advertisments