Skip to content

Commit c016758

Browse files
authored
Merge pull request #1092 from gangliao/python_default
Check Python if system already equipped one
2 parents 9eedd53 + 9a7df69 commit c016758

File tree

8 files changed

+251
-231
lines changed

8 files changed

+251
-231
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ addons:
2121
packages:
2222
- gcc-4.8
2323
- g++-4.8
24-
- wget
2524
- git
2625
- build-essential
2726
- libatlas-base-dev
2827
- python
2928
- python-pip
3029
- python2.7-dev
30+
- python-numpy
31+
- python-wheel
3132
- curl
3233
- swig
3334
- graphviz
@@ -48,8 +49,7 @@ before_install:
4849
fi
4950
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
5051
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
51-
- pip install --upgrade pip
52-
- pip install wheel protobuf sphinx recommonmark sphinx_rtd_theme virtualenv pre-commit requests==2.9.2 LinkChecker
52+
- pip install numpy wheel protobuf sphinx recommonmark sphinx_rtd_theme virtualenv pre-commit requests==2.9.2 LinkChecker
5353
script:
5454
- paddle/scripts/travis/main.sh
5555
notifications:

CMakeLists.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ include(system)
2828
include(simd)
2929

3030
###################### Configurations ############################
31-
option(WITH_DSO "Compile PaddlePaddle with dynamic linked libraries" ON)
32-
option(WITH_GPU "Compile PaddlePaddle with gpu" ${CUDA_FOUND})
33-
option(WITH_DOUBLE "Compile PaddlePaddle with double precision, otherwise use single precision" OFF)
34-
option(WITH_AVX "Compile PaddlePaddle with avx intrinsics" ${AVX_FOUND})
35-
option(WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON)
36-
option(WITH_STYLE_CHECK "Style Check for PaddlePaddle" ON)
37-
option(WITH_RDMA "Compile PaddlePaddle with rdma support" OFF)
38-
option(WITH_TIMER "Compile PaddlePaddle use timer" OFF)
39-
option(WITH_PROFILER "Compile PaddlePaddle use gpu profiler" OFF)
40-
option(WITH_TESTING "Compile and run unittest for PaddlePaddle" ON)
41-
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
42-
option(WITH_SWIG_PY "Compile PaddlePaddle with py PaddlePaddle prediction api" ON)
43-
option(ON_TRAVIS "Running test on travis-ci or not." OFF)
44-
option(ON_COVERALLS "Generating code coverage data on coveralls or not." OFF)
45-
option(COVERALLS_UPLOAD "Uploading the generated coveralls json." ON)
31+
option(WITH_GPU "Compile PaddlePaddle with NVIDIA GPU" ${CUDA_FOUND})
32+
option(WITH_AVX "Compile PaddlePaddle with AVX intrinsics" ${AVX_FOUND})
33+
option(WITH_DSO "Compile PaddlePaddle with dynamic linked CUDA" ON)
34+
option(WITH_TESTING "Compile PaddlePaddle with unit testing" ON)
35+
option(WITH_SWIG_PY "Compile PaddlePaddle with inference api" ON)
36+
option(WITH_STYLE_CHECK "Compile PaddlePaddle with style check" ON)
37+
option(WITH_PYTHON "Compile PaddlePaddle with python interpreter" ON)
38+
option(WITH_DOUBLE "Compile PaddlePaddle with double precision" OFF)
39+
option(WITH_RDMA "Compile PaddlePaddle with RDMA support" OFF)
40+
option(WITH_TIMER "Compile PaddlePaddle with stats timer" OFF)
41+
option(WITH_PROFILER "Compile PaddlePaddle with GPU profiler" OFF)
42+
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
43+
option(ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF)
44+
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
45+
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
4646

4747
include(external/zlib) # download, build, install zlib
4848
include(external/gflags) # download, build, install gflags
@@ -63,7 +63,6 @@ include(flags) # set paddle compile flags
6363
include(cudnn) # set cudnn libraries
6464
include(version) # set PADDLE_VERSION
6565
include(coveralls) # set code coverage
66-
include(python_module) # set python module
6766

6867
include(configure) # add paddle env configuration
6968

cmake/configure.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
if(NOT WITH_PYTHON)
16+
add_definitions(-DPADDLE_NO_PYTHON)
17+
endif(NOT WITH_PYTHON)
18+
1519
if(WITH_DSO)
1620
add_definitions(-DPADDLE_USE_DSO)
1721
endif(WITH_DSO)

0 commit comments

Comments
 (0)