diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index b55fce5befdda7e579c5b98df82d2ba5096206bf..fba7c8a71dcaa8546f5a1903f2b4111290b05963 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -797,7 +797,7 @@ function generate_api_spec() { mkdir -p ${PADDLE_ROOT}/build/.check_api_workspace cd ${PADDLE_ROOT}/build/.check_api_workspace - virtualenv .${spec_kind}_env + virtualenv -p `which python` .${spec_kind}_env source .${spec_kind}_env/bin/activate if [ "$spec_kind" == "DEV" ]; then @@ -2449,16 +2449,18 @@ function trt_convert_test() { function build_pr_and_develop() { cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} + cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` + cp ${PADDLE_ROOT}/python/requirements.txt /tmp + generate_api_spec "$1" "PR" mkdir ${PADDLE_ROOT}/build/pr_whl && cp ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/pr_whl rm -f ${PADDLE_ROOT}/build/python/dist/*.whl && rm -f ${PADDLE_ROOT}/build/python/build/.timestamp - cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` if [[ ${cmake_change} ]];then rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt rm -rf ${PADDLE_ROOT}/build/third_party fi - git checkout . git checkout -b develop_base_pr upstream/$BRANCH cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number} + generate_api_spec "$1" "DEV" mkdir ${PADDLE_ROOT}/build/dev_whl && cp ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/dev_whl }