Skip to content

Commit 849229a

Browse files
committed
remove hardcoded python version
1 parent 17514d9 commit 849229a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pybind/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if pybind_option
2525
)
2626

2727
ext_suffix = run_command('python3-config', '--extension-suffix', check: true).stdout().strip().replace('.so', '')
28+
py_lib_name = run_command('python3', '-c', 'import sys; print(f"python{sys.version_info.major}.{sys.version_info.minor}")', check: true).stdout().strip()
2829
pybind_mod = shared_library('pyopenpivcore' + ext_suffix,
2930
sources: py_sources,
3031
include_directories: [
@@ -36,7 +37,7 @@ if pybind_option
3637
pybind11_dep,
3738
],
3839
cpp_args: ['-D_USE_MATH_DEFINES'],
39-
link_args: ['-lpython3.14'],
40+
link_args: ['-l' + py_lib_name],
4041
name_prefix: '',
4142
install: true,
4243
)

0 commit comments

Comments
 (0)