By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

distutils possibilities

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.