[Python-bugs-list] [ python-Bugs-459270 ] System-wide distutils cfg file misnamed

noreply@sourceforge.net noreply@sourceforge.net
Thu, 06 Sep 2001 11:42:16 -0700


Bugs item #459270, was opened at 2001-09-06 11:42
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459270&group_id=5470

Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Paul Sidorsky (paulsid)
Assigned to: A.M. Kuchling (akuchling)
Summary: System-wide distutils cfg file misnamed

Initial Comment:
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.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459270&group_id=5470