New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip installed wheels are not reproducible currently #11424
Comments
I assume you are using |
Thanks for the quick response. I have checked what happens; some time ago we (the yocto project) switched over from 'pip install' to 'python3 -m installer', and so the issue of reproducibility no longer comes up. This ticket can be closed. |
Since "python_pep517: use installer instead of pip" pip is no longer used in builds, and therefore doesn't need to behave reproducibly. I have submitted the patch upstream; upstream have suggested that the way it had been used previously is non-reproducible by design, and if pip is again brought into builds in the future, we should use specific options for reproducibility: pypa/pip#11424 (From OE-Core rev: 654f9d5) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Since "python_pep517: use installer instead of pip" pip is no longer used in builds, and therefore doesn't need to behave reproducibly. I have submitted the patch upstream; upstream have suggested that the way it had been used previously is non-reproducible by design, and if pip is again brought into builds in the future, we should use specific options for reproducibility: pypa/pip#11424 Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Description
Pip installed wheels are not reproducible currently. The direct_url
files encode an installation path and the installed wheels compile
the python files at their location, not their final install location
which is incorrect.
To fix this, Yocto project simply disables the direct_urls and passes the "root" to
the python compile function to strip that path out of the compiled
files.
A version of the attached patch, perhaps stripping root from the direct_urls
may be something that could be considered by upstream.
reproducible.patch.txt
Expected behavior
No response
pip version
22.2.2
Python version
3.10.6
OS
Yocto Linux
How to Reproduce
This can be seen by checking that installed wheels contain the original installation path in them.
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: