[Distutils] Script Files, Prefix, and Uninstallation

Phillip J. Eby pje at telecommunity.com
Sun May 4 19:51:42 CEST 2008

At 11:04 AM 5/4/2008 +0300, natan yellin wrote:
>I'm relatively new to python, and I have a few questions related to distutils.
>1) If I attempt to install script files without a .py extension, 
>distutils installs them twice- once with a .py extension and once 
>without. Is there a way to work around that?

I've never seen the behavior you're describing.  You should probably 
post your setup.py for us to see what you're doing.

>2) Is there a way to change the default install prefix from /usr to 

You can change that systemwide by creating the appropriate config 
file.  Please see the configuration file section of the "Installing 
Python Modules" manual.

>3) Is it possible to find the install prefix that was actually used. 
>(e.g. if the user set --prefix to something other than /usr/local). 
>I'd like to store the prefix in a file so that I can later uninstall 
>from the correct prefix. (Or is there an easier way to uninstall 
>that I'm missing?)

You can use the --record option to the install command to write a 
list of all files that were installed.

More information about the Distutils-SIG mailing list