This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: System-wide distutils cfg file misnamed
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, paulsid
Priority: normal Keywords:

Created on 2001-09-06 18:42 by paulsid, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (2)
msg6429 - (view) Author: Paul Sidorsky (paulsid) Date: 2001-09-06 18:42
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.
msg6430 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2001-12-06 16:35
Logged In: YES 
user_id=11375

It's a documentation bug.  Fixed in rev. 1.51 of dist.py
and rev. 1.37 of inst.tex.  Thanks!

History
Date User Action Args
2022-04-10 16:04:25adminsetgithub: 35131
2001-09-06 18:42:14paulsidcreate