mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[BE][CMake] Use FindPython module (#124613)
As FindPythonInterp and FindPythonLibs has been deprecated since cmake-3.12 Replace `PYTHON_EXECUTABLE` with `Python_EXECUTABLE` everywhere (CMake variable names are case-sensitive) This makes PyTorch buildable with python3 binary shipped with XCode on MacOS TODO: Get rid of `FindNumpy` as its part of Python package Pull Request resolved: https://github.com/pytorch/pytorch/pull/124613 Approved by: https://github.com/cyyever, https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
942d9abd66
commit
0910429d72
@ -17,8 +17,7 @@ import sys
|
||||
import sysconfig
|
||||
|
||||
flags = [
|
||||
f"-DPYTHON_EXECUTABLE:FILEPATH={sys.executable}",
|
||||
f"-DPYTHON_INCLUDE_DIR={sysconfig.get_path('include')}",
|
||||
f"-DPython_EXECUTABLE:FILEPATH={sys.executable}",
|
||||
]
|
||||
|
||||
print(" ".join(flags), end="")
|
||||
|
Reference in New Issue
Block a user