On 31 August 2017 at 06:36, Nathaniel Smith <njs@pobox.com> wrote:
On Wed, Aug 30, 2017 at 9:56 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On 31 August 2017 at 14:22, xoviat <xoviat@gmail.com> wrote:
Again, let me repeat that: wheels generated using setuptools are valid for CPython only if build on CPython. This is not the current setuptools behavior but will be for all setuptools build backend calls (I assume legacy will remain the same).
While I do think your proposal would work (on the assumption that folks aren't use "pip wheel" to generate their wheel files for upload),
I use 'pip wheel' to generate wheel files for upload... (I like to generate an sdist and then build a wheel from that, and 'pip wheel sdist.tar.gz' is more convenient than manually unpacking and running bdist_wheel. )
Agreed. The wheels built by "pip wheel" mustn't change (and that means that neither pip nor the setuptools backend should not change the tags it applies to wheels by default). The fact that pip artificially restricts wheels it builds as part of its internal use to be platform-specific is a workaround for an underlying problem, which is that it cannot guarantee that an internally-built wheel will be the same as one that the project later publishes for that version (it's a variation on the wheel equivalency problem we've been discussing). Rather than artificially modifying the compatibility tags, pip should cache internally-built wheels differently, so that wheels published by the upstream project have priority over pip-built wheels. That's a change that purely affects pip and is unrelated to PEP 517 directly, but it's something pip probably needs to do to prepare for switching to PEP 517. (xoviat - sorry I didn't think of this when commenting on the PR - it was Nick's suggestion here that made the situation clearer to me).
an alternative approach with a lower risk of unintended side effects would be for *pip* to either rename the autobuilt file before adding it to the cache, or else to adjust its caching strategy a bit to internally separate a shared wheel download cache from per-interpreter-compatibility-tag caches for locally built wheel files.
+1
Yes. Renaming is a hack, to be honest, and improving the caching strategy would be my preference. Paul