6.1 Location and names of config files
The names and locations of the configuration files vary slightly across
platforms. On Unix, the three configuration files (in the order they
are processed) are:
system |
prefix/lib/pythonver/distutils/pydistutils.cfg |
(1) |
personal |
$HOME/.pydistutils.cfg |
(2) |
local |
setup.cfg |
(3) |
On Windows, the configuration files are:
system |
prefix\Lib\distutils\pydistutils.cfg |
(4) |
personal |
%HOME\pydistutils.cfg |
(5) |
local |
setup.cfg |
(3) |
And on MacOS, they are:
system |
prefix:Lib:distutils:pydistutils.cfg |
(6) |
personal |
N/A |
|
local |
setup.cfg |
(3) |
Notes:
- (1)
- Strictly speaking, the system-wide configuration file lives
in the directory where the Distutils are installed; under Python 1.6
and later on Unix, this is as shown. For Python 1.5.2, the Distutils
will normally be installed to
prefix/lib/site-packages/python1.5/distutils,
so the system configuration file should be put there under Python
1.5.2.
- (2)
- On Unix, if the HOME environment variable is not
defined, the user's home directory will be determined with the
getpwuid() function from the standard pwd module.
- (3)
- I.e., in the current directory (usually the location of the
setup script).
- (4)
- (See also note (1).) Under Python 1.6 and later, Python's
default ``installation prefix'' is C:\Python, so
the system configuration file is normally
C:\Python\Lib\distutils\pydistutils.cfg.
Under Python 1.5.2, the default prefix was
C:\Program Files\Python, and the
Distutils were not part of the standard library--so the system
configuration file would be
C:\Program Files\Python\distutils\pydistutils.cfg
in a standard Python 1.5.2 installation under Windows.
- (5)
- On Windows, if the HOME environment variable is not
defined, no personal configuration file will be found or used. (In
other words, the Distutils make no attempt to guess your home
directory on Windows.)
- (6)
- (See also notes (1) and (4).) The default installation
prefix is just Python:, so under Python 1.6 and later this is
normallyPython:Lib:distutils:pydistutils.cfg. (The Distutils
don't work very well with Python 1.5.2 under MacOS. ** true? **)
See About this document... for information on suggesting changes.