469,935 Members | 1,600 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

distutils possibilities

I learnt that distutils can be used to package python modules and
packages. Fine it does that well.

Suppose I am writing an python application (not package or module),
and suppose that I am using Linux. Where should I install the python
source files and bin scripts and data in my /usr directory?

Should the python (.py) files go into /usr/lib/pythonXX/site-packages
or /usr/lib/myapp or /usr/share/myapp ?

Should the data files go to /usr/share/myapp or anything else?

Should the pixmap files go to /usr/share/pixmaps/myapp?

I can write setup.py to do all these things. But in general are there
any standards for installation directories? Note that I am asking this
for python _applications_ not packages like PIL,Numeric. Hope you get
me. There are python source files, executable scripts (/usr/bin) and
data files distributed in a typical applications.

Finally, since the installation directory can vary (as the sys admin
can customize the prefix and also during development the prefix is
usually current directory), I need pythonic solution for such a
dynamic constants.py file.
In automake world, one would write constants.py.in and transform this
into constants.py. Rememerber constants.py file contain different
values during development (prefix=/home/sri/Projects/myapp) and
different values during deployment (prefix=/usr/) Again, I can follow
my logic, to create such a constants.py script, by coding the logic in
setup.py script and supporting extra command line option. But are
there any standard tool or any support from distutils to do such
things?

Now a bit of relaxation, what abt installtion directories in other
platforms?
Jul 18 '05 #1
1 1119
On 14 Feb 2004 02:57:43 -0800, Sridhar R <sr*************@yahoo.com> wrote:
I learnt that distutils can be used to package python modules and
packages. Fine it does that well.

Suppose I am writing an python application (not package or module),
and suppose that I am using Linux. Where should I install the python
source files and bin scripts and data in my /usr directory?


I believe the Debian people have faced a similar problem, with distutils
versus their packaging procedure and file system standards. Google their
mailing lists for some thoughts on the matter (in case of no reply here).

/Jorgen

--
// Jorgen Grahn <jgrahn@ ''If All Men Were Brothers,
\X/ algonet.se> Would You Let One Marry Your Sister?''
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Isaac Jones | last post: by
1 post views Thread by Mathieu Malaterre | last post: by
15 posts views Thread by Colin J. Williams | last post: by
1 post views Thread by Terry Hancock | last post: by
7 posts views Thread by Frans Englich | last post: by
reply views Thread by Maarten Sneep | last post: by
6 posts views Thread by ajikoe | last post: by
7 posts views Thread by vedrandekovic | last post: by
reply views Thread by newbie73 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.