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
Data files copied incorrectly #128
Comments
|
This is not about installer vs. setuptools, but rather, it's more generally about setup.py install vs. using wheels. The wheel spec doesn't account for files installed outside of prefix (that is, /usr) so you cannot install to /etc. It also doesn't handle absolute paths as part of prefix, even if the prefix is the same, which may or may not matter depending on whether you would want to install data to /usr even when python is not in /usr.
It's also deprecated, largely because PyPA wants to reduce the scope of "python-specific build systems" and just consolidate on wheels to handle the problem of python modules, not all the other crazy things multi-language projects with deep system integrations get up to. :p I talked about this a bit at pypa/packaging-problems#576 (comment) |
|
I've been considering that meson might be a better fit for this kind of usage (e.g.: a regular desktop application which include a desktop entry, icons, systemd service, and other files in Based on your reply, it sounds that this is the recommended approach for this kind of applications too, right? I guess that providing wheels for these is also no longer a great idea either. |
|
Yes, Meson would be a better fit for this sort of use cases. Publishing wheels wouldn’t work (and any tool letting a wheel work like this should be considered violating the rules). |
|
I don't have much more to add, but... Yea, this sounds like you'll have to avoid wheels as a whole and use a different more-flexible build mechanism (meson, CMake etc) for handling, at least, the data files. Depending on the project and your preferences, you may also be able to use those to package the project. |
|
In this case, it's about caffeine-ng, but this is also something that somewhat affects vdirsyncer, todoman and khal, and probably other desktop applications (which include things like services, shell autocompletions, man pages, etc). I'll try and experiment with meson a bit, it does seem well suited for the task, and in this particular case, can also deal with non-python dependencies. My initial goal is to have two modes of operation:
This should be able to compensate for the fact that "simply" installing into a virtualenv via pip would be somewhat unsupported. I'll try and prototype this a bit and share my findings -- I'm sure others will come asking the same questions for similar scenarios. |
|
Thanks for the guidance here, I'll go ahead and close this; there's nothing left to discuss here. |
That's a big fat "maybe". You might want to support some sort of "degraded" mode where you can install the executable entry point with e.g. it might be an acceptable tradeoff to not install the man page and a systemd service. It might be an unacceptable tradeoff to not install a desktop file and an icon theme. |
They're unusable for this type of application. See: pypa/installer#128
Hi! I maintan caffeine-ng. When installing via
setup.py, everything installs as expected:Installs, amongst other files:
But when using
installer:The files are installed into the wrong path, the example from above ends up in:
This is my relevant code: https://codeberg.org/WhyNotHugo/caffeine-ng/src/commit/e351249f3913e3f1354fba768803063597972125/setup.py#L9-L28
I'm not entirely sure what's wrong. Is this usage unsupported by
installer? Is it deprecated, or pending implementation? Or have I found a bug?The text was updated successfully, but these errors were encountered: