Skip to content

Commit 1af8600

Browse files
authored
Closes #16; Merge pull request #17 from ggplijter/fix-python3-venv-cmake
Make CMake use venv Python version
2 parents 70ada3a + a144735 commit 1af8600

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ install(TARGETS myactuator_rmd
5353
)
5454

5555
if(PYTHON_BINDINGS)
56-
find_package(Python REQUIRED COMPONENTS
56+
find_package(Python3 REQUIRED COMPONENTS
5757
Development
5858
Interpreter
5959
)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
3030

3131
cmake_args = [
3232
f"-D CMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
33-
f"-D PYTHON_EXECUTABLE={sys.executable}",
33+
f"-D Python3_EXECUTABLE={sys.executable}",
3434
f"-D CMAKE_BUILD_TYPE={cfg}",
3535
f"-D PYTHON_BINDINGS=on"
3636
]

0 commit comments

Comments
 (0)