File tree Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Expand file tree Collapse file tree 2 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -57,26 +57,8 @@ function(install_py_jinja2)
57
57
execute_process (COMMAND ${PYTHON_EXECUTABLE} -m pip install -U jinja2 )
58
58
endfunction ()
59
59
60
- function (install_py_pybind11_stubgen )
61
- # check install
62
- execute_process (
63
- COMMAND
64
- ${PYTHON_EXECUTABLE} "-c"
65
- "import re, pybind11_stubgen; print(re.compile('/__init__.py.*').sub('',pybind11_stubgen.__file__))"
66
- RESULT_VARIABLE _pybind11_stubgen_status
67
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE )
68
-
69
- if (_pybind11_stubgen_status EQUAL 0 )
70
- return ()
71
- endif ()
72
-
73
- execute_process (COMMAND ${PYTHON_EXECUTABLE} -m pip install -U
74
- pybind11-stubgen )
75
- endfunction ()
76
-
77
60
install_py_pyyaml ()
78
61
install_py_jinja2 ()
79
- install_py_pybind11_stubgen ()
80
62
81
63
# parse ops
82
64
set (parsed_op_dir ${CMAKE_BINARY_DIR} /paddle/phi/ops/yaml )
Original file line number Diff line number Diff line change @@ -735,4 +735,23 @@ if(WITH_PYTHON)
735
735
get_property (os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES )
736
736
target_link_libraries (${SHARD_LIB_NAME} ${os_dependency_modules} )
737
737
738
+ function (install_py_pybind11_stubgen )
739
+ # check install
740
+ execute_process (
741
+ COMMAND
742
+ ${PYTHON_EXECUTABLE} "-c"
743
+ "import re, pybind11_stubgen; print(re.compile('/__init__.py.*').sub('',pybind11_stubgen.__file__))"
744
+ RESULT_VARIABLE _pybind11_stubgen_status
745
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE )
746
+
747
+ if (_pybind11_stubgen_status EQUAL 0 )
748
+ return ()
749
+ endif ()
750
+
751
+ execute_process (COMMAND ${PYTHON_EXECUTABLE} -m pip install -U
752
+ pybind11-stubgen )
753
+ endfunction ()
754
+
755
+ install_py_pybind11_stubgen ()
756
+
738
757
endif ()
You can’t perform that action at this time.
0 commit comments