Distributing apps using external libs

I have a few apps sleeping on my hd. I want to distribute
them / make them public - as scripts. I am a little bit
tired of building .exe and probably some of them will run
on other platforms.

If these apps were "monolithic" (a single py module or a set
of modules in a single dir), there would be no problem. I left
away the *\site-packages librairies. As I'm a good Python
programmer ;.) , I have my own modules library in a third dir.
And of course, my apps are using some of these modules.

Some info about my lib:
o ~1.5 Mb of py modules
o I tend to use an incremental maintainance of my lib modules.
  Eg: abc1.py (creation, Py 2.2), abc2.py (abc1 + Py 2.3 update),
  abc3 (abc2 + bug fixes + improvments), and so on.
o My lib modules may not be written with all the state of the art,
  no comments, comments in French or German. (After all, I'm a
  hobbyist).
o Some modules may seems "opaque" to the end user. They do
  not "participate" to the final app, they are more tools
  modules. Eg. A decomposition-of-a-square-matrix-in-
  singular-values module.
o Some modules are only relevant in a development phase.
o They are rather bug(s) free.

As long these apps live on my hd, no problem. Now, you see
my question. What is the best practice to distribute my apps?

1. Distributing separately the lib and the apps.
2. Adding the used lib modules as py modules to the app modules.
3. Adding the used lib modules as zip module to the app.
4. The whole lib in a zip module.
5. Back to py2exe.
6. ?

My preference goes to 3. sys.path.append('module.zip') is a
nice feature. The time penalty is small and I do not update
my lib modules every day.

Just curious about other opinions.

Jean-Michel Fauth, Switzerland

Jean-Michel Fauth wrote:

1. Distributing separately the lib and the apps.
2. Adding the used lib modules as py modules to the app modules.
3. Adding the used lib modules as zip module to the app. 4. The whole lib in a zip module.
5. Back to py2exe.

I'd go with 1 or 3. Which would depend on:

1) do you have a bunch of apps that all use the library? Would the same user be likely to use a number of them? I so then 1 makes sense, otherwise, 3 probably makes more sense.

2) How often does the library change? doing 1 is like dynamically linking to libs, doing 3 is like statically linking. AS with dynamic libraries, some versioning system for the lib would be a good idea.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov