- Notifications
You must be signed in to change notification settings - Fork3.1k
Description
A tricky issue I discovered while re-readingWheelBuilder.build
.
I got to wonder why the python tag of the built wheel would depend on whether we were doing pip install (should_unpack=True) or pip wheel (should_unpack=False).
With pip 19.3.1, do this (the chosen distribution name is a pure python sdist that has no wheel PyPI):
- pip install odoo-autodiscover (the wheel is built and cached)
- pip wheel odoo-autodiscover (the wheel is obtained from cache: odoo_autodiscover-2.0.0-cp37-none-any.whl)
Notice thecp37 tag.
Now, empty the cache and do:
- pip wheel odoo-autodiscover (the wheel is built and you get: odoo_autodiscover-2.0.0-py3-none-any.whl)
Notice thepy3 tag.
So depending on whether the wheel was installed and cached before, the result ofpip wheel
is different.
This behaviour was apparently introduced in0e240d7.
Now with systematic caching introduced in#7285, the behavior is subtly different: a py3 or cp37 wheel gets cached depending on whether pip install or pip wheel is executed first. Whereas before#7285, only cp37 could be cached, never py3.
I'm not too sure what to do with that yet, as I don't really understand the motivation of0e240d7.