From 3ecc63ad165913b4b62f41a009c9e1c2406a3441 Mon Sep 17 00:00:00 2001 From: liaogang Date: Thu, 5 Jan 2017 11:08:22 +0800 Subject: [PATCH] Add python in travis ci for paddle version command --- .travis.yml | 2 ++ paddle/api/CMakeLists.txt | 24 ++++++++++++------------ paddle/api/test/CMakeLists.txt | 2 +- paddle/api/test/run_tests.sh | 4 ---- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61d31132b..27a4be38f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,9 @@ addons: - git - build-essential - libatlas-base-dev + - python - python-pip + - python2.7-dev - curl - graphviz - clang-format-3.8 diff --git a/paddle/api/CMakeLists.txt b/paddle/api/CMakeLists.txt index dd617e326..3ac50e34b 100644 --- a/paddle/api/CMakeLists.txt +++ b/paddle/api/CMakeLists.txt @@ -94,17 +94,17 @@ add_dependencies(python_api_wheel python_swig_sources paddle_cuda) if(WITH_TESTING) - SET(PIP_SOURCES_DIR ${PYTHON_SOURCES_DIR}/pip) - ExternalProject_Add(pip - ${EXTERNAL_PROJECT_LOG_ARGS} - GIT_REPOSITORY https://github.com/pypa/pip.git - GIT_TAG 9.0.1 - PREFIX ${PIP_SOURCES_DIR} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND env ${py_env} ${PYTHON_EXECUTABLE} setup.py install - BUILD_IN_SOURCE 1 - DEPENDS python setuptools python_api_wheel - ) + SET(PIP_SOURCES_DIR ${PYTHON_SOURCES_DIR}/pip) + ExternalProject_Add(pip + ${EXTERNAL_PROJECT_LOG_ARGS} + GIT_REPOSITORY https://github.com/pypa/pip.git + GIT_TAG 9.0.1 + PREFIX ${PIP_SOURCES_DIR} + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND env ${py_env} ${PYTHON_EXECUTABLE} setup.py install + BUILD_IN_SOURCE 1 + DEPENDS python setuptools python_api_wheel + ) add_subdirectory(test) endif() diff --git a/paddle/api/test/CMakeLists.txt b/paddle/api/test/CMakeLists.txt index 985df6f56..a2fa623c8 100644 --- a/paddle/api/test/CMakeLists.txt +++ b/paddle/api/test/CMakeLists.txt @@ -1,2 +1,2 @@ add_test(NAME test_swig_api - COMMAND bash ${PROJ_ROOT}/paddle/api/test/run_tests.sh ${PYTHON_EXECUTABLE} ${PYTHON_INSTALL_DIR}/bin/pip) + COMMAND bash ${PROJ_ROOT}/paddle/api/test/run_tests.sh ${PYTHON_EXECUTABLE}) diff --git a/paddle/api/test/run_tests.sh b/paddle/api/test/run_tests.sh index f00ec2c96..bcf06afa8 100755 --- a/paddle/api/test/run_tests.sh +++ b/paddle/api/test/run_tests.sh @@ -20,10 +20,6 @@ popd > /dev/null cd $SCRIPTPATH -# rm -rf .test_env -# virtualenv .test_env -# source .test_env/bin/activate - $1 -m pip install ../../dist/*.whl test_list="testArguments.py testGradientMachine.py testMatrix.py testVector.py testTrain.py testTrainer.py" -- GitLab