Skip to content

Commit 3363194

Browse files
committed
move to pybind dir
1 parent 5ec6ef8 commit 3363194

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

paddle/fluid/operators/generator/CMakeLists.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,8 @@ function(install_py_jinja2)
5757
execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install -U jinja2)
5858
endfunction()
5959

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-
7760
install_py_pyyaml()
7861
install_py_jinja2()
79-
install_py_pybind11_stubgen()
8062

8163
# parse ops
8264
set(parsed_op_dir ${CMAKE_BINARY_DIR}/paddle/phi/ops/yaml)

paddle/fluid/pybind/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,4 +735,23 @@ if(WITH_PYTHON)
735735
get_property(os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES)
736736
target_link_libraries(${SHARD_LIB_NAME} ${os_dependency_modules})
737737

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+
738757
endif()

0 commit comments

Comments
 (0)