473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1226
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Isaac Jones | last post by:
Hello Python Community. I bring greetings from the Haskell community (http://www.haskell.org) ;) There has been a lot of discussion of late about creating a grand-unified build & distribution...
1
by: Mathieu Malaterre | last post by:
Hello, I thought this would be easy but I guess I didn't get the distutil feeling. I am trying to write a setup for install my package but I don't understand how to do that. organisation: ...
15
by: Colin J. Williams | last post by:
The distutils download page has: -------------------------------------------------------- Current stable release The current stable release is Distutils 1.0.2; you can download it as: *...
1
by: Terry Hancock | last post by:
Some time ago, I got the idea that I wanted to build image resources from vector graphic originals, instead of marshalling hundreds of tiny little icon images by hand. I wrote "BuildImage" to do...
7
by: Frans Englich | last post by:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: ...
0
by: Maarten Sneep | last post by:
I'm trying to build PyBison on Mac OS X, and I'm running into some problems with the distutils. Just for starters: PyBison requires Pyrex. This is not a problem, and Pyrex seems to work without...
6
by: ajikoe | last post by:
Hello I tried to combine c++ and python together. So I follow from this website: http://kortis.to/radix/python_ext/ I have this code: # prmodule.c static PyObject *pr_isprime(PyObject *self,...
7
by: vedrandekovic | last post by:
Hello again, Is there any patch for python "distutils", for this ImportError: cannot import name log Regards, Vedran
0
by: newbie73 | last post by:
OS: Vista Python 2.5.2.2 (ActiveState Software Installation) Running latest Cygwin release The error generated is pasted below - please help. - Luis ***************************************
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.