-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
pyproject.toml
#4085
Comments
It triggers some new warnings:
|
Good enough for now. See also #4086 What's not solved is how |
This isn't a setuptools problem. The Python Packaging Authority ("not an authority") has authoritatively stated that:
The wheel format does not permit you to install files to /etc, so you can simply quit that line of thought immediately. It is not happening, end of story. You can continue using Ultimately, PyPA wants to "get out of the game". Back in the day, setup.py was the python ecosystem's answer to cross-platform Makefiles that:
... but you could use that however you liked, it was "just a toolkit". They've since decided that supporting arbitrary application packaging is hard work and out of scope for the PyPI.org ecosystem of distributable wheels, and wish to refocus their efforts on doing one thing and doing it well, and removing support for users who want to do two things. |
You may be interested in porting to meson (disclaimer: I am a meson developer) since it:
|
@eli-schwartz thanks, I didn't think of switching to meson. I believe that all the platforms we target have it installed.
And that is what is so infuriating. |
Yeah. :( Porting between build systems is hard work, especially the "check that it is feature compatible" stage. That said, given setup.py install is deprecated with intent to remove at some point, so really I believe it basically has to be done at some point, and the earlier the better since it gives more time to test a replacement before There's some good news to go with the bad news, though: a decent amount of what's going on in setup.py is manually implemented things that meson has native functionality for.
I would be happy to provide advice, please feel free to @ me if you have questions. |
@eli-schwartz you may be regretting this pretty quickly! |
So the problem is that you are getting |
@eli-schwartz yes, we need an absolute path without any |
Meson has (optional) settings per target for build time and install time RPATH. It also generates internal build time RPATH entries per target for each dependency library containing the absolute path, which is necessary to ensure uninstalled running of your programs, whether that is for:
At install time, a depfixer is run to rewrite rpath to something suitable for installation. On macOS, naturally, this runs install_name_tool. So it's easy to grep for in the codebase. Anyways, it is here: https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/depfixer.py The fix_darwin function (as opposed to fix_elf) looks like this excerpt:
The comment particularly notes that we get rid of those This works fine for any libraries built by meson. At https://wrapdb.mesonbuild.com you can see that someone has contributed a "meson wrap" for libjpeg-turbo, which allows you to do this:
and install a tiny INI formatted (This is the default search pattern. There's a configure option for people who would rather a different policy, such as "always use vendored subprojects" or "our policy is that vendoring is banned, just fail if it isn't available", or "anything is fine as long as no network connections are made".) For libavif, since no one wrote a meson port for the WrapDB, it is "probably" possible to use meson's cmake module to configure libavif and parse the cmake debug tracing API, retrieve build definitions, and convert it to a meson AST then build it with meson. In case you're wondering, yes, that is exactly as hacky as it sounds. :D However, nontrivial effort has been put into making it work, and for the most part that has succeeded. |
Already added in 1f47f78
More should be added to it: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
The text was updated successfully, but these errors were encountered: