File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ add_custom_command(
158
158
${CMAKE_CURRENT_BINARY_DIR} /python/paddle_custom_device/npu/passes
159
159
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR} /passes/*
160
160
${CMAKE_CURRENT_BINARY_DIR} /python/paddle_custom_device/npu/passes
161
- COMMAND python3 ${CMAKE_CURRENT_BINARY_DIR} /setup.py bdist_wheel
161
+ COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} /setup.py bdist_wheel
162
162
DEPENDS ${CUSTOM_NPU_NAME}
163
163
COMMENT "Packing whl packages------>>>" )
164
164
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ Configuring cmake in build ...
46
46
-DWITH_ATB=${WITH_ATB:- OFF}
47
47
-DON_INFER=${ON_INFER:- OFF}
48
48
-DWITH_COVERAGE=${WITH_COVERAGE:- OFF}
49
+ -DPYTHON_VERSION=${PYTHON_VERSION:- " " }
49
50
========================================
50
51
EOF
51
52
@@ -58,6 +59,7 @@ cmake .. \
58
59
-DWITH_ATB=${WITH_ATB:- OFF} \
59
60
-DON_INFER=${ON_INFER:- OFF} \
60
61
-DWITH_COVERAGE=${WITH_COVERAGE:- OFF} \
62
+ -DPYTHON_VERSION=${PYTHON_VERSION:- " " } \
61
63
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON; cmake_error=$?
62
64
63
65
if [ " $cmake_error " != 0 ]; then
Original file line number Diff line number Diff line change 12
12
# License for the specific language governing permissions and limitations under
13
13
# the License.
14
14
15
- find_package (Python ${PYTHON_VERSION} REQUIRED COMPONENTS Interpreter
16
- Development )
15
+ if (NOT PYTHON_VERSION )
16
+ find_package (Python REQUIRED COMPONENTS Interpreter Development )
17
+ else ()
18
+ find_package (
19
+ Python ${PYTHON_VERSION} REQUIRED
20
+ COMPONENTS Interpreter Development
21
+ EXACT )
22
+ endif ()
23
+
24
+ message (STATUS "Python_EXECUTABLE is ${Python_EXECUTABLE} " )
17
25
include_directories (${Python_INCLUDE_DIRS} )
18
26
19
27
if (DEFINED ENV{PADDLE_CUSTOM_PATH} )
You can’t perform that action at this time.
0 commit comments