Open dcrowe777 opened 3 weeks ago
Thanks for the report @dcrowe777. We were just looking at that exact line in gh-13851 and wondering if it was used at all. I'm curious about your use case, could you elaborate?
It seems like we may need:
'gcc'
: .a
.lib
For each of those, we will then need libpython{vernum}
or libpython{vernum}t
, depending on is_freethreaded
. Unclear to me if we also need stable ABI variants. And I guess we probably shouldn't support the "mixed compilers" use case for static linking (libpython313.lib
+ 'gcc'
).
My use case is MSVC with the following lines in meson.build :
pymod = import('python') py = pymod.find_installation('python3') py_dep = py.dependency(embed: 'true', static: true)
https://github.com/mesonbuild/meson/blob/1feb771f06ade5d0c721022c11fa76f5a7dd8fcb/mesonbuild/dependencies/python.py#L220
statically linked python fails on windows with :
Program python3 found: YES Program C:\Python311\python found: YES (C:\Python311\python.exe) Could not find Python3 library 'C:\Python311\libs\libpython311.a' Run-time dependency python found: NO (tried sysconfig)
meson.build:33:12: ERROR: Python dependency not found