[Distutils] prefix in bdist_rpm

Bob Ippolito bob at redivi.com
Thu Feb 23 08:23:52 CET 2006

On Feb 22, 2006, at 10:55 PM, Pavel Roskin wrote:

> On Wed, 2006-02-22 at 20:27 -0800, Bob Ippolito wrote:
>> On Feb 22, 2006, at 7:41 PM, Pavel Roskin wrote:
>>> Then what is the proper use of the "prefix", "exec-prefix" and  
>>> "home"
>>> options in the install section of setup.cfg?
>> That same code also parses ~/.pydistutils.cfg and the site-wide
>> distutils config.  It makes a lot of sense to set those sorts of
>> install options from there.
> Including "home"?

Sure.  Such values are infinitely valuable if a user has to convince  
distutils to do something strange for whatever reason.  Maybe they  
have several "home" dirs (local, workgroup, etc.) and they want to  
choose one in particular for this installation.

>>> If those options cannot be used properly, then maybe their support
>>> should be removed?
>> It's not Pythonic to try and stop you from doing everything that
>> could possibly be a bad idea.
> That's unfortunate.  I'd prefer to be told that a feature is not
> supported or is not implemented correctly or is going to be phased  
> out.
> It's better to consider other options in the beginning than to use the
> feature and have unexpected problems later.  After all, it's a
> configuration file with a very limited number of valid options, and no
> major guesswork should be involved.

You misunderstand how distutils works, especially its config files.   
These configuration files have an unlimited number of valid options.   
Whether an option is valid or not in a particular section depends on  
which distutils commands are available.  The configuration parser  
knows nothing about the semantics of the configuration options, and  
the commands know nothing about the particular source of the value  
(command line, setup.py, one of several config files, etc.).

If a package author decides to set weird default values for  
installation locations, I'd hardly call that an unexpected problem.   
Package authors do not know and should not care where users want to  
install their package, it's not their business.

There's no guesswork at all, there's a one-to-one relationship  
between options you can put in a config file and options you could  
pass on the command line.  If you want to know which options you can  
set for a given command, there's always --help.


More information about the Distutils-SIG mailing list