Not sure whether this is a bug or a documentation error. The documentation says you can put a
pydistutils.cfg file in your distutils directory to configure Distutils, as seen here:
http://python.sourceforge.net/devel-docs/inst/config-syntax.html
Distutils wouldn't load this file for me, so I did some digging and I found that Distutils' dist.py
contains this line (around line 284):
sys_file = os.path.join(sys_dir, "distutils.cfg")
I renamed my pydistutils.cfg file to distutils.cfg and it worked, as verified with DISTUTILS_DEBUG
turned on:
Distribution.parse_config_files():
reading e:\python21\lib\distutils\distutils.cfg
The docstring for parse_config_files() also specifies pydistutils.cfg as the system-wide file in a
couple of places, which added to the confusion.
On a related note, that same docstring seems to be all wrong WRT its behaviour under Windows:
On Windows and Mac OS, there are two possible config files:
pydistutils.cfg in the Python installation directory (sys.prefix)
and setup.cfg in the current directory.
From what I can tell, sys.prefix isn't the right directory (the distutils path is), and you can also put
a config file in a home directory (a la Unix) if the home directory is defined by a HOME environment
variable.
I'm running Python 2.1 under Windows ME.
|