fix: Improve python lib detection#1093
Conversation
c5d54ca to
da8aac9
Compare
|
For the lib part |
Pushed the fix just noticed in the get_library function if abi3=True we don't look for the .lib with minor version |
|
@LecrisUT let me know if any other changes are required here |
|
I thought that the original issue was more about what library variant gets detected and what gets reported by One key thing is that Footnotes |
|
The reason I didn't add this yet was I felt the old logic just tried "everthing possible", and wanted a more principled approach. Hard-coding things like pypy means this might miss graalpy, for example. It seems like "where's the library" shouldn't be that hard of question. But I added printouts for Have you looked at the logic in CMake's FindPython? That's been good, replicating that is likely ideal. There are two concerns; the one voiced above, with running into a new situtation like a new interpreter implementation, and the the other is cross-compiling. We might end up picking up a completely incorrect library if we try to hunt too hard. I'll try to carefully review soon, I've been distracted with pybind11 3.0 and cibuildwheel 3.0 release preparations, and I'm teaching a summer course. |
0fa0ac4 to
13579e0
Compare
On windows the vars in sysconfig return None so as a fallback we try to enumerate possible library candidates in the installation base to see if we can find the library Signed-off-by: Devashish Lal <[email protected]>
incase of sabi abi3=True is passed to get library which looks for the .lib without minor version Signed-off-by: Devashish Lal <[email protected]>
13579e0 to
6c290c2
Compare
On windows the vars in sysconfig return None so as a fallback we try to enumerate possible library candidates in the installation base to see if we can find the library
This change get's rid of the following warning