classification
Title: distutils config file should have the same name on both platforms and all scopes
Type: behavior Stage:
Components: Distutils, Distutils2 Versions: Python 3.2, Python 3.1, Python 2.7, 3rd party
process
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, exarkun, tarek, zooko
Priority: normal Keywords:

Created on 2009-07-23 20:07 by zooko, last changed 2010-09-30 02:08 by eric.araujo.

Messages (5)
msg90860 - (view) Author: Zooko O'Whielacronx (zooko) Date: 2009-07-23 20:07
Currently we have this:

http://docs.python.org/install/#location-and-names-of-config-files

The distutils config file can have one of four different names depending
on which platform and which location.  This makes it harder for people
to remember the file's name and location, and more complicated for
programs that want to detect it.  Why not give it the same name on both
platforms and all locations?
msg90862 - (view) Author: Zooko O'Whielacronx (zooko) Date: 2009-07-23 20:14
I was spurred to write this ticket today because of a conversation with
J.P. Calderone:

<exarkun> but, I have no clue where distutils.cfg goes on Windows
msg91188 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-08-02 16:20
The mac/win difference is with the starting dot because it's impossible
under windows to name a file under the directory browser UI that starts
with a ".". You have to be a power-user to do so. (pydistutils.cfg
versus .pydistutils.cfg)

Now for pydistutils.cfg  vs distutils.cfg I don't know why it's like
that. It should be "distutils.cfg" everywhere imho. Even if the global
and local one are eventually merged. I'll launch a thread about it on
distutils-sig.

Next, setup.cfg is for the current directory because this how you
operate with packages that have setup.py+setup.cfg files : you chdir in
the directory then run a distutils command.

Last, under windows, it should use os.path.expanduser('~') instead of
looking for a HOME variable. this will be fix in any case.
msg102826 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-04-11 12:19
Let me add that os.path.expanduser is the Right Way™ to get a user’s home directory on POSIX too, since not every setup has a $HOME envvar or a /etc/passwd file. The only interface one should use is the pwd module (or  getent in shell scripts), and so does os.path.expanduser.

Reassigning to Distutils2.

Regards
msg117694 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-30 02:08
Re-adding distutils because of the $HOME vs. os.path.expanduser fix.
History
Date User Action Args
2010-09-30 02:08:40eric.araujosetnosy: zooko, exarkun, tarek, eric.araujo
messages: + msg117694
components: + Distutils
versions: + 3rd party, Python 3.1
2010-04-11 12:19:38eric.araujosetnosy: zooko, exarkun, tarek, eric.araujo
messages: + msg102826
components: + Distutils2, - Distutils
2010-04-09 00:23:48eric.araujosetnosy: + eric.araujo
2009-08-02 16:20:23tarekset
nosy: + exarkun
versions: + Python 2.7, Python 3.2
messages: + msg91188
priority: normal
type: behavior
resolution: accepted
2009-07-23 20:14:23zookosetmessages: + msg90862
2009-07-23 20:07:14zookocreate