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: setup.py install doesn't honor PYTHONUSERBASE
Type: enhancement Stage: resolved
Components: Distutils Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: tarek Nosy List: doko, eric.araujo, tarek
Priority: normal Keywords: patch

Created on 2009-11-10 12:56 by doko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
userbase.diff doko, 2009-11-10 12:56 proposed patch
Messages (4)
msg95111 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2009-11-10 12:56
Got an user report about setup.py install not honoring PYTHONUSERBASE.
Is this by design? If not, the attached patch seems to implement this
functionality.
msg95112 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-11-10 13:13
install_userbase is using USER_BASE which is in site.py.

This value is initialized when Python starts, and does check for
PYTHONUSERBASE in the environ. (if ENABLE_USER_SITE is true)

If this doesn't happen, this is most likely because the user can't write
to its .local.

If he can, you need to debug the Python starting process (site.main())
to see why it's not used.
msg99476 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-02-17 16:38
Hello

It seems to me that your patch doesn’t fix a bug but adds a feature. PEP 370 says that “distutils.command.install (setup.py install) gets a new argument --user to install packages in the user site directory”, not that the presence of the envvar should trigger the user install scheme.

Can you give a link to the original bug report?

Regards
msg112439 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-02 09:23
Closing in two weeks if there is no additional information. Please reopen if needed.
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51548
2010-09-02 18:34:27eric.araujosetstatus: pending -> closed
keywords: patch, patch
resolution: not a bug
stage: resolved
2010-08-02 09:23:40eric.araujosetstatus: open -> pending
keywords: patch, patch
messages: + msg112439
2010-02-17 16:38:21eric.araujosetnosy: + eric.araujo
messages: + msg99476
2009-11-10 13:13:22tareksetkeywords: patch, patch

messages: + msg95112
2009-11-10 12:56:38dokocreate