Repository: incubator-singa Updated Branches: refs/heads/master 4bd6827eb -> 0330af0f4
SINGA-290 Upgrade to Python 3 Fix the bug from mis-using swig cmd for py2/py3 Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/0330af0f Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/0330af0f Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/0330af0f Branch: refs/heads/master Commit: 0330af0f4bfa19a35c63302320ce09f7e3e27ca4 Parents: 4bd6827 Author: Wei Wang <[email protected]> Authored: Tue Aug 15 22:22:06 2017 +0800 Committer: Wei Wang <[email protected]> Committed: Tue Aug 15 22:22:06 2017 +0800 ---------------------------------------------------------------------- doc/en/docs/installation.md | 2 +- python/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/0330af0f/doc/en/docs/installation.md ---------------------------------------------------------------------- diff --git a/doc/en/docs/installation.md b/doc/en/docs/installation.md index 79996a4..cdf2eff 100755 --- a/doc/en/docs/installation.md +++ b/doc/en/docs/installation.md @@ -109,7 +109,7 @@ The following libraries are optional * `USE_CUDA=ON`, used if CUDA and cuDNN is available * `USE_PYTHON=ON`, used for compiling PySINGA * `USE_OPENCL=ON`, used for compiling with OpenCL support - * `PYTHON2=ON`, used for compiling with Python 2 support. (The default is Python 3) + * `PYTHON3=ON`, used for compiling with Python 3 support. (The default is Python 2) * `PACKAGE=ON`, used for building the Debian package 3. compile the code, e.g., `make` http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/0330af0f/python/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 01396ff..f5a1484 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -94,10 +94,10 @@ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/singa/proto) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/rafiki) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/api) -IF(PYTHON2) - SET(SWIG_PYTHON3 "") -ELSE() +IF(PYTHON3) SET(SWIG_PYTHON3 "-py3") +ELSE() + SET(SWIG_PYTHON3 "") ENDIF() execute_process(
