1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Use ~/.config/pip to store configuration/logging instead of ~/.pip

This commit is contained in:
Ben Rosser 2012-04-22 21:25:42 -04:00
parent 58ad223871
commit b6e3ccdef8
2 changed files with 20 additions and 1 deletions

15
README Normal file
View file

@ -0,0 +1,15 @@
This is my development fork of pip, the Python package installer- see the
official site ( http://www.pip-installer.org/en/latest/contributing.html)
for more on it.
I haven't done much yet, but the reason I decided to get involved and start
writing code for pip was so that I could fix a few annoying problems related
to the "build" temp folders created by pip.
Namely, if pip fails for whatever reason, the temp folder (which is created
in the current working directory) will not be deleted. I decided I could fix
this by first moving build to a temporary directory (using tempfile), and
second ensuring it was always deleted.
I'm looking at making a handful of other tweaks as well, such as moving the
pip configuration from ~/.pip to ~/.config/pip.

View file

@ -42,7 +42,11 @@ if sys.platform == 'win32':
default_log_file = os.path.join(default_storage_dir, 'pip.log')
else:
bin_py = os.path.join(sys.prefix, 'bin')
default_storage_dir = os.path.join(user_dir, '.pip')
#Use ~/.config/pip instead of ~/.pip- cleaner home folder
#On some systems, we may have to create this, on others it probably exists
if not os.path.exists(os.path.join(user_dir, '.config')):
os.mkdir(os.path.join(user_dir, '.config'))
default_storage_dir = os.path.join(user_dir, '.config', 'pip')
default_config_file = os.path.join(default_storage_dir, 'pip.conf')
default_log_file = os.path.join(default_storage_dir, 'pip.log')
# Forcing to use /usr/local/bin for standard Mac OS X framework installs