[Distutils] directory for applications

Pehr Anderson pehr@eink.com
Mon Jul 23 10:21:03 2001

Dear Gernot,

For my applications installed with distutils,
I look at the sys.argv[0] argument for the path
in which my main python file resides. Then I append
a relative path to sys.path before I attempt to 
import my application modules.

This seems like a very reasonable way to do it.
I install the whole directory tree for my app
in /usr/local/appname or /usr/local/share/appname
and put a launch script in /usr/local/bin


On Mon, Jul 23, 2001 at 11:40:44AM +0200, Gernot Jander wrote:
> Is there any known "standard" directory location for complete applications
> written in Python?
> I think a typical internationalized application contains at least
> four different file types:
> 1. an executable (Python-)script
> 2. one or more (Python-)modules (specific for this application)
> 3. one or more subdirectories containing xxx.mo files for gettext
> 4. a xxx.rc file for gtk-styles
> Splitting this up in /usr/local/bin, /usr/python/site-packages and
> /usr/local/share makes it hard to de-install the application. Furthermore
> I think that application-specific modules should not go to site-packages,
> since this is the place for global packages/modules and not for modules
> that are only meaningfull in the context of one application.
> Therefore I decided to have one /usr/local/python/xxx directory for each
> of my applications and install all files there (besides the scripts).
> But this solution implies to have these directories in the $PYTHONPATH
> and makes the distribution not portable to other OS.
> Are there any intentions to improve the support of applications in
> distutils?
> Asks
> Gernot
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> http://mail.python.org/mailman/listinfo/distutils-sig

Pehr Anderson, E Ink Corporation, 617-499-6019, http://eink.com