simple python deployment tool

Alexander Kapps alex.kapps at web.de
Thu Jul 8 05:21:35 EDT 2010


King wrote:
> Hi,
> 
> I am writing a python package deployment tool for linux based
> platforms. I have tried various existing
> tool sets but none of them is up to the mark and they have their own
> issues. Initially I'll start with simple approach.

I'm sorry, but your approach is not going to work. The Right Way(tm) 
is to not ship any external libraries, but let the user install the 
dependencies with the distro's package manager. And to not try to 
build custom packages, but to let the package maintainers  of the 
different distros package your application for you.

> 1. Find all the modules/packages and copy to "lib" directory.
> 2. Find python's *.so dependencies(system libs) and copy them to
> "syslib"

That would include all the way down to libc, your archive is going 
to be huge, but the actual problem is, what if the libc isn't 
compatible with the kernel, what if the WX, GTK, X11, etc libraries 
aren't compatible with the running Xserver?

End of the story is, you would need to package a minimal (but almost 
complete) Linux system into your package, which of course is not 
want you want.

> 3. Copy python(executable) and libpython2.6.so.1.0 into "dist"
> directory.
> 4. Set up temp environment
> 5. Run main script using "python <main script>.py"
> 
> The idea is to produce a cleaner directory structure. Neither I am
> creating a boot loader nor I am converting main script
> file into executable. It's plain vanilla stuff.

It's not vanilla stuff, but a very hard problem. In fact you are 
fighting against the whole system structure.




More information about the Python-list mailing list