New submission from Siming Yuan: in CentOS installations where both 32 and 64 bit libraries can co exist, and when python is compiled to run with 32-bit libraries (i686)
>>> from distutils.util import get_platform >>> get_platform() 'linux-x86_64' because the api only looks at OS flavor and not the actual binary architecture. this string is used as part of PEP425 tags in the built wheel/egg file: my_package-3.3.0-cp34-cp34m-linux-x86_64.whl but this creates a mismatch with PIP - pip.pep425tags returns "linux-i686" instead on the same python instance, addressed by: # snippet pip code def _is_running_32bit(): return sys.maxsize == 2147483647 if result == "linux_x86_64" and _is_running_32bit(): # 32 bit Python program (running on a 64 bit Linux): pip should only # install and run 32 bit compiled extensions in that case. result = "linux_i686" so the end result is any packages built with sdist_wheel (using setuptools/distutils) is not installable on the same instance. Of course the workaround is to overwrite that and provide --plat-name linux_i686. but the question is - shouldn't the tags line up? ---------- components: Distutils messages: 300300 nosy: dstufft, merwok, siming85 priority: normal severity: normal status: open title: distutils/util.py get_platform() does not identify linux-i686 platforms versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31211> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com