Many Linux distribution (most of them) distinguish between library directory /usr/lib for noarch or 32bit libraries and /usr/lib64. This patch (originally from openSUSE) enables to capture this distinction.
Hum. I'm not sure about "unix_home" scheme in distutils. It seems like Fedora still writes files into HOME/.../lib/...andnotHOME/.../lib/... and not HOME/.../lib/...andnotHOME/.../lib64/.... Example on Fedora 28: vstinner@apu$ python3 -m pip install --user greenlet Collecting greenlet Using cached https://files.pythonhosted.org/packages/dd/ce/7b3a19a3eb8c79e6237ba1fb7a8729b39034dd2de8753b8d27e5abc59fd5/greenlet-0.4.13-cp36-cp36m-manylinux1_x86_64.whl Installing collected packages: greenlet Successfully installed greenlet-0.4.13 vstinner@apu$ python3 -m pip uninstall greenlet Uninstalling greenlet-0.4.13: Would remove: /home/vstinner/.local/include/python3.6m/greenlet/greenlet.h /home/vstinner/.local/lib/python3.6/site-packages/greenlet-0.4.13.dist-info/* /home/vstinner/.local/lib/python3.6/site-packages/greenlet.cpython-36m-x86_64-linux-gnu.so Proceed (y/n)?
I think there are open tickets discussing this, and the problem is more complex that a simple PR: - Debian does multiarch that’s more than just lib/lib64 - some systems have lib32 I think - recent systems merge / and /usr, is that relevant? - how does virtualenv follow or customize install schemes - doko patches Python in Debian and Ubuntu to edit sysconfig/distutils