[Python-ideas] Add processor generation to wheel metadata
vano at mail.mipt.ru
Mon Oct 30 08:45:57 EDT 2017
Generally, packages are compiled for the same processor generation as
the corresponding Python.
But not always -- e.g. NumPy opted for SSE2 even for Py2 to work around
some compiler bug
I was bitten by that at an old machine once and found out that there is
no way for `pip' to have checked for that.
Besides, performance-oriented packages like the one mentioned could
probably benefit from newer instructions.
gcc, cl and clang all have their private directories of generation
Linux packages typically use gcc's ones. Clang generally follows in
gcc's footsteps and accepts cl's IDs, too, as aliases.
So, using the IDs of whatever compiler is used to build the package
(i.e. most likely the canonical compiler for CPython for that platform)
looks like the simple&stupid(r) way - we can just take the value of the
The tricky part is mapping the system's processor to an ID when checking
compatibility: the logic will have to keep a directory (that's the job
of `wheel' package maintainers though, I guess).
I also guess that there are cases where there's no such thing as _the_
More information about the Python-ideas