Message153738
The site.getusersitepackages, site.addusersitepackages and co. functions all call one function which makes sure site.USER_SITE is set according to envvars and command-line options; under python -s, addusersitepackages will not add the user site dir to sys.path, but it will cause site.USER_SITE to be set (to False), so that’s why I can’t be sure that your patch does not change behavior. test_site has good coverage for IIRC (just not sure if it covers starting python -s/-S and then importing site, and python -s/-S then import site then call site.main).
I regret that all these site functions are public, now we can’t simplify them to have the setting of site.USER_SITE in only one place. |
|
Date |
User |
Action |
Args |
2012-02-20 00:21:52 | eric.araujo | set | recipients:
+ eric.araujo, pitrou, vstinner, eric.smith, tarek, neologix |
2012-02-20 00:21:52 | eric.araujo | set | messageid: <1329697312.31.0.605767714312.issue14057@psf.upfronthosting.co.za> |
2012-02-20 00:21:51 | eric.araujo | link | issue14057 messages |
2012-02-20 00:21:51 | eric.araujo | create | |
|