mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
This reverts commit 94d7f0c1ef9a4cb4db0eb5d6b1ffc55941cbeab1. Reverted https://github.com/pytorch/pytorch/pull/158475 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/158475#issuecomment-3085447409))
25 lines
670 B
Python
25 lines
670 B
Python
## @package get_python_cmake_flags
|
|
# Module scripts.get_python_cmake_flags
|
|
##############################################################################
|
|
# Use this script to find your preferred python installation.
|
|
##############################################################################
|
|
#
|
|
# You can use the following to build with your preferred version of python
|
|
# if your installation is not being properly detected by CMake.
|
|
#
|
|
# mkdir -p build && cd build
|
|
# cmake $(python ../scripts/get_python_cmake_flags.py) ..
|
|
# make
|
|
#
|
|
|
|
|
|
import sys
|
|
import sysconfig
|
|
|
|
|
|
flags = [
|
|
f"-DPython_EXECUTABLE:FILEPATH={sys.executable}",
|
|
]
|
|
|
|
print(" ".join(flags), end="")
|