another distutils question

Eric S. Johansson esj at harvee.org
Fri Sep 29 15:34:22 EDT 2006


Robert Kern wrote:
> Eric S. Johansson wrote:
>> is there anyway I can, in a setup.py file, set  and internal equivalent 
>> to the '--install-scripts' commandline option?
> 
> Please don't. Hard-coding that interferes with the user's decision of where 
> things should go. Only the user should be making that decision, not the package 
> author.

  I understand the concern and if I was making a general purpose 
package, it would be appropriate to not set the path.  But these are 
internal commands that shouldn't pollute /usr/bin for a variety of 
reasons (almost all daemons, friends of daemons and cgi programs).  The 
CGI programs are particularly interesting because they are all 
surrounded by sgid wrappers and I need to put them in a place the 
wrapper can find them and keep them from accidental corruption. 
distutils is not particularly adept at handling such cases.

But the second reason to force the path is to reduce errors at install 
time (i.e. reducing the number of places someone to make a mistake if 
they want to use the application defaults).  Ideally, best of both 
worlds would be enabling application specific override of the internal 
default which, in turn, can be overridden with the commandline setting.

if there is no simple way to do this, I guess I will need add 
functionality to setup.py and move the scripts to the right location 
after they have been put in the wrong one.

---eric





More information about the Python-list mailing list