-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
python: only link extension modules against libpython when distutils does too. Fixes #4117 #4187
Conversation
b812f28
to
358c3e5
Compare
@MathieuDuponchelle does this seem ok to you? |
Well, while I can't help but think this seems a bit unsafe, if that's how distutils works, we should follow that. In addition, once we have module level options, we should probably expose this as an option so that distros don't have to patch meson :) Not sure what the appveyor failure is about? |
I can change it to call into distutils and mirror its behavior if wanted. |
Appveyor failure is in Cygwin and the job took 1+hour, which means it probably just timed out. I've restarted it. |
Upstream CPython is thinking about making not-linking the default for Python 3.8: python/cpython#9912 |
So this MR would mirror that behaviour for all versions of Python? |
ping |
It doesn't currently. I'll look into that. |
…does too. Fixes mesonbuild#4117 Windows requires things to be linked, on macOS distutils doesn't link by default. On Linux etc. things are not so clear, some distros like Debian patch distutils to not link, some don't. In addition the manylinux wheels spec prohibits linking against libpython and upstream is thinking about changing the default: https://bugs.python.org/issue34814 Call into distutils to figure out what distutils does and in case it doesn't link against libpython replace the passed in Python dependency with a partial one.
358c3e5
to
9b615f8
Compare
It does now. |
Since this is a behavioural change and the dev freeze is in effect, we'll get this merged after the release on Sunday. |
In my testing, mesonbuild/meson#4187 is necessary to successfully compile conda-forge/gobject-introspection-feedstock#9 on macOS. This patch can be taken out whenever the next Meson release comes out.
Windows requires things to be linked, on macOS distutils doesn't link by default.
On Linux etc. things are not so clear, some distros like Debian patch distutils to not link,
some don't. In addition the manylinux wheels spec prohibits linking against libpython
and upstream is thinking about changing the default:
https://bugs.python.org/issue34814
Call into distutils to figure out what distutils does and in case it doesn't link
against libpython replace the passed in Python dependency with a partial one.