-
Notifications
You must be signed in to change notification settings - Fork 70
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
wrong mapping of "datadir" variable #517
Comments
meson-python/mesonpy/__init__.py Lines 80 to 92 in 8b0733f
Files installed to meson's --datadir directory are inserted into the wheel as such:
The wheel file then maps this to |
As @eli-schwartz points out, There is no way for For this reason, the use of the |
No, what I'm pointing out is that the wheel package format has well-defined this to be "plop those files directly into the There is almost no practical use other than to have files in It is often wrong, of course, because typically you must install files to either /usr/share, /usr/local/share, or ~/.local/share and installing them to But meson-python is still mishandling what definition is there. |
I now see what you mean. However, I'm not convinced that prepending |
From meson's side, the distinction is that wheel "data" corresponds to meson's Meson-python could bundle up all files installed anywhere within prefix, or just the ones that are in the datadir subset. I'm not sure what the answer should be. We do, after all, agree that wheel "data" doesn't really specify what it should mean, regardless of how well defined its install scheme key defines the output directory pathname. |
Setuptools is the only other build system that I happen to know offhand supports it. And setuptools requires you to list files as "data files: collection of paths that may or may not not begin with a forward slash, and if they begin with a forward slash then you cannot use pep517 because it will just arbitrarily do something that makes no sense, and if they begin without a forward slash, and should be installed to /usr/share/foo.txt, then define the path as As part of setuptools' general move to stop worrying about being a build system for python software and start being an interchangeable widget "for installing libraries and cli entrypoints" indistinguishable from any other build backend, they've (soft?) deprecated their support for the wheel "data" scheme because they don't want to deal with people trying to use it and then wondering why Linux GUI software installed in a virtualenv doesn't have any Desktop Menu integration, icon schemes, mimetypes, or man pages and cannot be used at all. Personally, I think the answer is that people should stop using virtualenvs, but what do I know. 🤷 |
There's more uses, e.g. Virtualenvs are a headache indeed - on the one hand I'm not a fan, but on the other hand if we start supporting this we may give users something that doesn't work as they expect on Windows nor with virtualenvs. There are still use cases left then (e.g., I'm using |
Hi meson-python team,
I encountered this issue when working on dipy/dipy#2715.
With the help of @eli-schwartz, we saw that
get_option('datadir')
does not return theshare
folder.Meson-python
maps "datadir" to /usr instead of /usr/share -- or more generally, to the python prefix instead of python prefix + "/share".Thank you in advance for the future fix and let me know if my issue is not clear. Thanks!
The text was updated successfully, but these errors were encountered: