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.

Author jaraco
Recipients Anthony Sottile, Chris Billington, Ivan.Pozdeev, SilentGhost, __Vano, barry, brett.cannon, christian.heimes, eric.smith, eric.snow, ethan smith, jaraco, mhammond, ncoghlan, pitrou, takluyver, terry.reedy, vstinner
Date 2019-01-14.19:20:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547493604.93.0.897192831353.issue33944@roundup.psfhosted.org>
In-reply-to
Content
I like Nick's proposal. It has I believe the features that satisfy the use-cases of which I'm currently aware... with one edge case you may not have considered - support for multiple `__sitecustomize__` locations.

Consider, for example, the case where `__sitecustomize__` is in some system space unwritable by the user, but the package being installed is being installed in `--user` space.

Or consider the case where permissions aren't at play, but where you have a package installed in a different part of the PYTHONPATH. For example, [pip-run installs a sitecustomize module](https://github.com/jaraco/pip-run/blob/6203b1aa8cb52b5c181457054cf6ddaa40361437/pip_run/launch.py#L33-L44) in a temporary directory that it adds to sys.path. Ignoring for a moment the reason why it does this, I'd like to focus on the general need - that multiple paths on PYTHONPATH might expect `__sitecustomize__` support. You wouldn't want to have all of the `__sitecustomize__` hooks in one directory, because then they'll be decoupled from components that may or may not be in PYTHONPATH.

For these reasons, I think you'd want for `__sitecustomize__` to be supported to exist in multiple locations on PYTHONPATH and honor all of the files in all such directories, somewhat similar to how namespace packages are supported.
History
Date User Action Args
2019-01-14 19:20:06jaracosetrecipients: + jaraco, mhammond, barry, brett.cannon, terry.reedy, ncoghlan, pitrou, vstinner, eric.smith, christian.heimes, SilentGhost, __Vano, eric.snow, takluyver, Ivan.Pozdeev, Anthony Sottile, ethan smith, Chris Billington
2019-01-14 19:20:04jaracosetmessageid: <1547493604.93.0.897192831353.issue33944@roundup.psfhosted.org>
2019-01-14 19:20:04jaracolinkissue33944 messages
2019-01-14 19:20:04jaracocreate