-
Notifications
You must be signed in to change notification settings - Fork 69
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
meson-python
does not append editable
keyword before ABI tag(s) with --editable
flag
#620
Comments
I re-read the PEP and I don't see where it makes any statement about the wheel filename other than:
If you can see the filename to tell that it uses a different style than setuptools, that implies the wheel has somehow been exposed to you as an end user, which may be a pip bug. |
Can you please point me to where PEP660 specifies that |
I offer my apologies – both of you are right (what I assumed here was that the PEP 660 specification is what is controlling how
The local version identifier is slightly different, however, it talks about a local version that is appended with a
I don't think |
I'll try to find some resources on the |
editable
keyword before ABI tag(s) with --editable
flagmeson-python
does not append editable
keyword before ABI tag(s) with --editable
flag
I still don't understand what the issue is here. The PEP says you are not permitted to use the wheel file, it's an internal implementation detail of a frontend. The only reason wheel files are used at all is because the python ecosystem has no replacement for In Makefile terms, you can't do The rpm, sorry, python wheel, is used as a bootstrap shim. build_wheel returns a filename string for a public wheel that can be saved in a cache, uploaded to PyPI, added to a GitHub Releases tag, or emailed to a friend. build_editable returns a filename string for an internal bootstrap shim that the frontend (pip) must internally install, and then must delete the bootstrap shim so that it never hits a cache or is available to users. Why does it matter what the filename of the bootstrap shim is? Where did you encounter the inconsistency, and what difficulties did you encounter as a result of the inconsistency? |
Thanks for the comment and the extra information, @eli-schwartz.
I think the editable installations are working as they are intended to, so the issue is just really about not having the editable keyword in the filename of the wheel built from It does not affect the installation and does not give rise to further issues at package runtime, of course, so it can be considered something that's quite low-priority in terms of getting a fix out for it – but I would be interested in contributing if other people too think that this is in scope and if I could receive some pointers :). There are no difficulties that I am currently having because of the inconsistency. |
If it doesn't give rise to any issues then perhaps the filename does not matter and there isn't anything that needs fixing? |
Yes, the filename does not matter at all, but it could be misleading to other users (just as it was to me). It let me to think that I pursued the non-editable installation pathway ( N.B., the size of the wheel is correctly displayed, though, as is the case with editable wheels, they are smaller in comparison to normal wheels since the compiled files are not copied or bundled into an editable wheel. |
Wheel filenames do not contain keywords. Wheel filenames are defined to be Therefore what other build backends to is to append >>> import packaging.utils
>>> packaging.utils.parse_wheel_filename('pywavelets-1.7.0.dev0.editable-cp312-cp312-linux_x86_64.whl')
Traceback (most recent call last):
...
packaging.version.InvalidVersion: Invalid version: '1.7.0.dev0.editable' therefore, if there is anything that is violating Python packaging standards or user expectation, they are other build backends, not meson-python. |
Thanks, @dnicolodi for the response and the resolution. I did feel that |
Description
The
meson-python
build backend does not seem to conform entirely with the specification noted by PEP 660, and currently builds Python packages in editable mode but without the editable keyword.The wheel built after the compilation proceeds is named as follows:
MWE / steps to reproduce
For the purpose of this bug report, a reproducer is as follows:
Any other Python packages using
meson
as the underlying build system should also produce the same output.Expected behaviour
The build backend should append the
editable
keyword at theget_requires_for_build_editable
stage when the wheel gets created, therefore renaming the wheel to have this keyword before the ABI tag and after the version of the package, i.e., the wheel should be named as follows:Other available and popular build backends – such as
setuptools
for compiled extensions andhatchling
for pure Python projects correctly add theeditable
keyword.Relevant logs or additional context
I noticed this when trying to test out the recent editable installations improvements (#569) that came out with the new
0.16.0
release. xref: PyWavelets/pywt#702The text was updated successfully, but these errors were encountered: