[Python-Dev] Where it is decided whether "lib" or "lib64" ends up in sys.path on a POSIX (non MacOS) system?

2020年10月03日 07:40:04 -0700

Hi everyone!
First of all, sorry for bringing up, perhaps, a trivial matter, but since it's 
about the sources I guess it's better to ask it here.
I'm investigating a curious problem caused by the fact that in a user's 
virtualenv, created with the standard "venv" module, "lib64" directory, 
traditionally symlinked to "lib", gets included in sys.path
instead of "lib" itself.
```
$ python -msite
sys.path = [
 '/current/working/directory'
 '/usr/lib64/python36.zip',
 '/usr/lib64/python3.6',
 '/usr/lib64/python3.6/lib-dynload',
 '/path/to/venv/lib64/python3.6/site-packages',
]
```
The user is on Gentoo, and, though the venv's layout is exactly the same, it's 
different from the typical result on a Debian-based distribution where it's the 
original "lib" in sys.path, not its "lib64" link. I'm wondering what's 
controlling this behavior. Modules/getpath.c doesn't mention 
architecture-dependent lib directories anywhere, at least at first glance. 
Could someone please give me a hint about where to look in the sources or, 
maybe, which build options are affecting this?
Thanks a lot!
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5T72JDQG7D44CFYN7URPB5I5JATMD6AR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to