Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit 4384f73

Browse files
committed
misc(cmake): specify current interpreter as Python3_EXECUTABLE in setup.py
1 parent 447685b commit 4384f73

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

build2cmake/src/templates/cuda/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def build_extension(self, ext: CMakeExtension) -> None:
3939

4040
cmake_generator = os.environ.get("CMAKE_GENERATOR", "")
4141

42-
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
42+
# Set Python3_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
4343
# EXAMPLE_VERSION_INFO shows you how to pass a value into the C++ code
4444
# from Python.
4545
cmake_args = [
4646
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
47-
f"-DPython_EXECUTABLE={sys.executable}",
47+
f"-DPython3_EXECUTABLE={sys.executable}",
4848
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
4949
]
5050
build_args = []

build2cmake/src/templates/metal/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def build_extension(self, ext: CMakeExtension) -> None:
3939

4040
cmake_generator = os.environ.get("CMAKE_GENERATOR", "")
4141

42-
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
42+
# Set Python3_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
4343
# EXAMPLE_VERSION_INFO shows you how to pass a value into the C++ code
4444
# from Python.
4545
cmake_args = [
4646
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
47-
f"-DPython_EXECUTABLE={sys.executable}",
47+
f"-DPython3_EXECUTABLE={sys.executable}",
4848
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
4949
]
5050
build_args = []

build2cmake/src/templates/xpu/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def build_extension(self, ext: CMakeExtension) -> None:
3939

4040
cmake_generator = os.environ.get("CMAKE_GENERATOR", "")
4141

42-
# Set Python_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
42+
# Set Python3_EXECUTABLE instead if you use PYBIND11_FINDPYTHON
4343
# EXAMPLE_VERSION_INFO shows you how to pass a value into the C++ code
4444
# from Python.
4545
cmake_args = [
4646
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
47-
f"-DPython_EXECUTABLE={sys.executable}",
47+
f"-DPython3_EXECUTABLE={sys.executable}",
4848
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
4949
]
5050
build_args = []

0 commit comments

Comments
 (0)