summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/dist.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-05-10 19:51:55 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-05-10 19:51:55 (GMT)
commitcd8001c8ed8ea11b13a57be7f0e524133177c2f8 (patch)
tree2eb1a8681fa32764b64cc9ca723c455692e2f5a7 /Lib/distutils/dist.py
parent4ff7fc49c6ac474545e942348aed90e7730d514e (diff)
downloadcpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.zip
cpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.tar.gz
cpython-cd8001c8ed8ea11b13a57be7f0e524133177c2f8.tar.bz2
#1858 from Tarek Ziade:
Allow multiple repositories in .pypirc; see http://wiki.python.org/moin/EnhancedPyPI for discussion. The patch is slightly revised from Tarek's last patch: I've simplified the PyPIRCCommand.finalize_options() method to not look at sys.argv. Tests still pass.
Diffstat (limited to 'Lib/distutils/dist.py')
-rw-r--r--Lib/distutils/dist.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
index d098cb9..0b13c1e 100644
--- a/Lib/distutils/dist.py
+++ b/Lib/distutils/dist.py
@@ -343,10 +343,9 @@ Common commands: (see '--help-commands' for more)
user_filename = "pydistutils.cfg"
# And look for the user config file
- if 'HOME' in os.environ:
- user_file = os.path.join(os.environ.get('HOME'), user_filename)
- if os.path.isfile(user_file):
- files.append(user_file)
+ user_file = os.path.join(os.path.expanduser('~'), user_filename)
+ if os.path.isfile(user_file):
+ files.append(user_file)
# All platforms support local setup.cfg
local_file = "setup.cfg"