-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dependencies: add pybind11 custom factory #11463
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11463 +/- ##
==========================================
+ Coverage 67.10% 68.82% +1.71%
==========================================
Files 418 209 -209
Lines 91126 45574 -45552
Branches 20247 9434 -10813
==========================================
- Hits 61154 31367 -29787
+ Misses 25250 11784 -13466
+ Partials 4722 2423 -2299 see 211 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This makes use of mesonbuild/meson#11463 to find pybind11 using the pybind11-config script installed in build isolation. If that doesn't work, for example the version of Meson is too old, then we fall back to the previous method of manually running some introspection code, and no harm is done.
This makes use of mesonbuild/meson#11463 to find pybind11 using the pybind11-config script installed in build isolation. If that doesn't work, for example the version of Meson is too old, then we fall back to the previous method of manually running some introspection code, and no harm is done.
@eli-schwartz I just realized that this is going to break the fix for in-tree venvs in scipy/scipy#18006. I think this implementation should use |
It works for me:
from build.ninja:
No warnings are triggered, because it's only caused by |
Ah okay, thanks. I remembered checking before and |
This works with pkg-config and cmake without any special support. The custom factory adds further support for config-tool, via `pybind11-config`. This is useful because the config-tool will work out of the box when pybind11 is installed, but the pkg-config and cmake files are shoved into python's site-packages, which is an unfortunate distribution model and makes it impossible to use in an out of the box manner. It's possible to manually set up the PKG_CONFIG_PATH to detect it anyway, but in case that does not happen, having the config-tool fallback is extremely useful.
This works with pkg-config and cmake without any special support. The custom factory adds further support for config-tool, via
pybind11-config
. This is useful because the config-tool will work out of the box when pybind11 is installed, but the pkg-config and cmake files are shoved into python's site-packages, which is an unfortunate distribution model and makes it impossible to use in an out of the box manner.It's possible to manually set up the PKG_CONFIG_PATH to detect it anyway, but in case that does not happen, having the config-tool fallback is extremely useful.
Depends on pybind/pybind11#4526 (sort of, the version will be unknown without that PR)