[Distutils] PEP 517 again
Nathaniel Smith
njs at pobox.com
Fri Sep 1 20:58:58 EDT 2017
On Fri, Sep 1, 2017 at 11:30 AM, Chris Barker <chris.barker at noaa.gov> wrote:
> I'm still confused -- if setuptools ( invoked by pip) is producing
> incorrectly named wheels -- surely that's a bug-fix/workaround that should
> go into setuptools?
>
> If the build is being run by pip, then doesn't setuptools have all the info
> about the system that pip has?
Some setup.py files are written by project authors who want to use
them to generate wheels for uploading to PyPI, so they're carefully
written to generate good wheels, the wheels go through QA, etc. They
rely on setuptools's current (and fairly sensible) defaults for how to
tag wheels, and if those go wrong, then they take the responsibility
for fixing things.
Other setup.py files were written by project authors who never
considered any possibility outside of 'setup.py install', and haven't
changed since. For them, setuptools's defaults are not so great, but
the authors don't care, because they never guaranteed that it would
work.
Setuptools can't tell which kind of setup.py is calling it. But pip
can make a pretty good guess: if it found a wheel on pypi, then
someone had to have uploaded it, and it's that person's job to make
sure the tags are correct. OTOH if it's taking some random setup.py
file it found in an sdist, then it could be the second type, so better
to play it safe and use a more restrictive wheel tag.
It's a bit quirky and annoying, but that's life. And in the grand
scheme of things this isn't a big deal. The only program that has to
care about this is pip, and pip can always change to a different
heuristic if the situation changes.
-n
--
Nathaniel J. Smith -- https://vorpus.org
More information about the Distutils-SIG
mailing list