File tree 2 files changed +8
-3
lines changed
src/pybindings/pycontroller
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,13 @@ shared_library("CHIPController") {
43
43
output_dir = " ${ target_out_dir } /pychip"
44
44
45
45
# TODO: Update to use GN tools to get actual paths
46
+ python_version = exec_script (" python-version.py" , [], " trim string" )
46
47
include_dirs = [ " ${ chip_root } /third_party/pybind11/repo/include" ]
47
48
if (current_os == " mac" ) {
48
49
include_dirs +=
49
- [ " ${ chip_root } /.environment/cipd/packages/python/include/python3.9 " ]
50
+ [ " ${ chip_root } /.environment/cipd/packages/python/include/python " + python_version ]
50
51
} else if (current_os == " linux" ) {
51
- include_dirs += [ " /usr/include/python3.9 " ]
52
+ include_dirs += [ " /usr/include/python " + python_version ]
52
53
} else {
53
54
assert (false , " OS not supported." )
54
55
}
@@ -86,7 +87,7 @@ shared_library("CHIPController") {
86
87
]
87
88
}
88
89
if (current_os == " linux" ) {
89
- libs = [ " python3.9 " ]
90
+ libs = [ " python " + python_version ]
90
91
}
91
92
}
92
93
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ import sys
4
+ print (f"{ sys .version_info .major } .{ sys .version_info .minor } " )
You can’t perform that action at this time.
0 commit comments