Uh oh!
There was an error while loading. Please reload this page.
add installation support for pkg-config dependency detection - #4077
Conversation
| endforeach() | ||
| set(${joined_path} "${temp_path}" PARENT_SCOPE) | ||
| set(temp_path "${first_path_segment}") | ||
| foreach(current_segment IN LISTS ARGN) |
There was a problem hiding this comment.
Is there some way to tell pre-commit.ci that this file belongs to another repo and shouldn't be autoformatted as that will result in a confusing file delta between here and the upstream version? 👀
There was a problem hiding this comment.
Yes, you can add an exclude key regex to the pre-commit-config.yaml for the relevant hook.
There was a problem hiding this comment.
Filename seems to have a dot in front of it...
This file is very big and I have basically zero knowledge of how it works other than "frustrating thing that messes up my commit messages", can I have a small hint at what I'm looking at, here? :)
There was a problem hiding this comment.
There was a problem hiding this comment.
Also could be worth mentioning this file can be removed once we depend on CMake 3.20+.
There was a problem hiding this comment.
Ah, thanks. Global exclude sounds helpful.
There was a problem hiding this comment.
I added comments in CMakeLists.txt, marked with # TODO: for easy searchability.
henryiii
commented
Jul 19, 2022
I'm traveling & at conferences, I'd like to take a look at the generated file. I might want to tweak the CMake code just a bit too. I'll have a bit more time starting Wednesday, so ping me ~Thursday if I don't get back to this by then. Thanks! |
eli-schwartz
commented
Jul 25, 2022
Ping. :)
BTW, here is the generated code for the regular wheel: It's the same content for the pybind11_global wheel except, of course, the location. pybind11: pybind11_global |
eli-schwartz
commented
Jul 29, 2022
@henryiii ping |
henryiii
commented
Jul 29, 2022
Thanks! I'm back in Princeton now after nearly a month of travel. Is there any reason it's joining the path rather than hardcoding the separator, as in |
eli-schwartz
commented
Jul 29, 2022
The JoinPaths function uses forward slashes anyway, exactly for portability reasons. And the paths need to be joined because cmake's includedir may or may not be an absolute path. (It will be a relative path when invoking cmake from setup.py, though.) |
@henryiii the test that you added is failing due to platform differences between Is this another of those "setuptools re-encodes all the newlines" issues? :( |
eli-schwartz
commented
Aug 5, 2022
By the way, merging this PR would help Void Linux successfully cross-compile SciPy. See scipy/scipy#16783 |
henryiii
commented
Aug 5, 2022
Sorry, in the third of four conferences in a row. And preparation for CPython 3.10rc1 is taking free time too. This just needs to address the failing test. Not too worried about the line endings, happy to normalize them in the test. I hopefully can do it by Monday, ping me if I don’t! (Or you can do it if you want) |
eli-schwartz
commented
Aug 5, 2022
No problem, take your time. I won't have time before then either, anyway. :) |
pkg-config is a buildsystem-agnostic alternative to `pybind11Config.cmake` that can be used from build systems other than cmake. Fixespybind#230
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
rwgk
commented
Aug 8, 2022
This is totally over my head but I looked out of curiosity. Is this impression correct?
If that's true, it might be nice to add that as a note to the PR description. Initially the phrase "alternative to pybind11Config.cmake" in the PR description led me to believe the pkg-config support will not involve cmake at all. |
eli-schwartz
commented
Aug 8, 2022
CMake is the build system that pybind11 uses, so CMake is used to generate the pkg-config file. Once generated (for example by producing a python wheel, or by running For the purposes of e.g. SciPy (and more generally meson) we don't involve CMake. |
rwgk
commented
Aug 8, 2022
Got it, thanks for the explanation! |
eli-schwartz
commented
Aug 10, 2022
@henryiii thanks for figuring out the CI. Really happy to see this landing. :) |
pkg-config is a build-system agnostic alternative to
pybind11Config.cmakethat can be used from build systems other than cmake.Fixes#230
Suggested changelog entry: