Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wzpei9
Paddle
提交
5fc9b116
P
Paddle
项目概览
wzpei9
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5fc9b116
编写于
6月 30, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ENH: Remove deprecated python build
上级
efbd380a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
187 deletion
+0
-187
cmake/external/python.cmake
cmake/external/python.cmake
+0
-187
未找到文件。
cmake/external/python.cmake
浏览文件 @
5fc9b116
...
...
@@ -32,193 +32,6 @@ IF(PYTHONINTERP_FOUND)
MESSAGE
(
FATAL_ERROR
"Found Python Protobuf
${
PY_GOOGLE.PROTOBUF_VERSION
}
< 3.0.0, "
"please use pip to upgrade protobuf. pip install -U protobuf"
)
ENDIF
()
ELSE
(
PYTHONINTERP_FOUND
)
MESSAGE
(
FATAL_ERROR
"Please install python 2.7 before building PaddlePaddle."
)
##################################### PYTHON ########################################
SET
(
PYTHON_SOURCES_DIR
${
THIRD_PARTY_PATH
}
/python
)
SET
(
PYTHON_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/python
)
SET
(
_python_DIR
${
PYTHON_INSTALL_DIR
}
)
IF
(
UNIX
)
SET
(
PYTHON_FOUND ON
)
SET
(
PYTHON_INCLUDE_DIR
"
${
PYTHON_INSTALL_DIR
}
/include/python2.7"
CACHE PATH
"Python include dir"
FORCE
)
SET
(
PYTHON_LIBRARIES
"
${
PYTHON_INSTALL_DIR
}
/lib/libpython2.7.a"
CACHE FILEPATH
"Python library"
FORCE
)
SET
(
PYTHON_EXECUTABLE
${
PYTHON_INSTALL_DIR
}
/bin/python CACHE FILEPATH
"Python executable"
FORCE
)
SET
(
PY_SITE_PACKAGES_PATH
"
${
PYTHON_INSTALL_DIR
}
/lib/python2.7/site-packages"
CACHE PATH
"Python site-packages path"
FORCE
)
ELSEIF
(
WIN32
)
SET
(
PYTHON_FOUND ON
)
SET
(
PYTHON_INCLUDE_DIR
"
${
PYTHON_INSTALL_DIR
}
/include"
CACHE PATH
"Python include dir"
FORCE
)
SET
(
PYTHON_LIBRARIES
"
${
PYTHON_INSTALL_DIR
}
/libs/python27.lib"
CACHE FILEPATH
"Python library"
FORCE
)
SET
(
PYTHON_EXECUTABLE
"
${
PYTHON_INSTALL_DIR
}
/bin/python.exe"
CACHE FILEPATH
"Python executable"
FORCE
)
SET
(
PY_SITE_PACKAGES_PATH
"
${
PYTHON_INSTALL_DIR
}
/Lib/site-packages"
CACHE PATH
"Python site-packages path"
FORCE
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"Unknown system !"
)
ENDIF
()
IF
(
APPLE
)
LIST
(
APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON
)
ENDIF
()
SET
(
EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
)
# Force Python build to "Release".
IF
(
CMAKE_CONFIGURATION_TYPES
)
SET
(
SAVED_CMAKE_CFG_INTDIR
${
CMAKE_CFG_INTDIR
}
)
SET
(
CMAKE_CFG_INTDIR
"Release"
)
ELSE
()
LIST
(
APPEND EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
)
ENDIF
()
ExternalProject_Add
(
python
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/python-cmake-buildsystem/python-cmake-buildsystem.git"
PREFIX
${
PYTHON_SOURCES_DIR
}
UPDATE_COMMAND
""
CMAKE_ARGS -DPYTHON_VERSION=2.7.12
CMAKE_ARGS -DCMAKE_CXX_COMPILER=
${
CMAKE_CXX_COMPILER
}
CMAKE_ARGS -DCMAKE_C_COMPILER=
${
CMAKE_C_COMPILER
}
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=
${
PYTHON_INSTALL_DIR
}
-DBUILD_LIBPYTHON_SHARED:BOOL=OFF
-DUSE_SYSTEM_LIBRARIES:BOOL=OFF
-DZLIB_ROOT:FILEPATH=
${
ZLIB_ROOT
}
-DZLIB_INCLUDE_DIR:PATH=
${
ZLIB_INCLUDE_DIR
}
-DZLIB_LIBRARY:FILEPATH=
${
ZLIB_LIBRARIES
}
-DDOWNLOAD_SOURCES:BOOL=ON
-DINSTALL_WINDOWS_TRADITIONAL:BOOL=OFF
${
EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS
}
${
EXTERNAL_PROJECT_OPTIONAL_CMAKE_ARGS
}
DEPENDS zlib
)
SET
(
py_env
PATH=
${
PYTHON_INSTALL_DIR
}
/bin
PYTHONHOME=
${
PYTHON_INSTALL_DIR
}
PYTHONPATH=
${
PYTHON_INSTALL_DIR
}
/lib:
${
PYTHON_INSTALL_DIR
}
/lib/python2.7:
${
PY_SITE_PACKAGES_PATH
}
)
####################################################################################
##################################### SETUPTOOLS ###################################
SET
(
SETUPTOOLS_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/setuptools
)
ExternalProject_Add
(
setuptools
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
SETUPTOOLS_SOURCES_DIR
}
URL
"https://pypi.python.org/packages/source/s/setuptools/setuptools-18.3.2.tar.gz"
BUILD_IN_SOURCE 1
PATCH_COMMAND
""
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
INSTALL_COMMAND
""
BUILD_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
DEPENDS python zlib
)
#####################################################################################
##################################### SIX ###########################################
SET
(
SIX_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/six
)
ExternalProject_Add
(
six
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
SIX_SOURCES_DIR
}
URL https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
BUILD_IN_SOURCE 1
PATCH_COMMAND
""
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
INSTALL_COMMAND
""
BUILD_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
DEPENDS python setuptools
)
#####################################################################################
##################################### CYTHON ########################################
SET
(
CYTHON_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/cython
)
ExternalProject_Add
(
cython
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
CYTHON_SOURCES_DIR
}
URL https://github.com/cython/cython/archive/0.25.2.tar.gz
GIT_TAG 0.25.2
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
""
PATCH_COMMAND
""
UPDATE_COMMAND
""
INSTALL_COMMAND
""
BUILD_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
DEPENDS python
)
####################################################################################
##################################### NUMPY ########################################
SET
(
NUMPY_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/numpy
)
SET
(
NUMPY_TAG_VERSION
"v1.11.3"
)
SET
(
NUMPY_VERSION
"1.11.3"
)
SET
(
EGG_NAME
""
)
SET
(
PYTHON_NUMPY_INCLUDE_DIR
""
)
IF
(
WIN32
)
SET
(
EGG_NAME
"numpy-
${
NUMPY_VERSION
}
-py2.7-
${
HOST_SYSTEM
}
.egg"
)
ELSE
(
WIN32
)
IF
(
APPLE
)
SET
(
EGG_NAME
"numpy-
${
NUMPY_VERSION
}
-py2.7-
${
HOST_SYSTEM
}
-
${
MACOS_VERSION
}
"
)
ELSE
(
APPLE
)
SET
(
EGG_NAME
"numpy-
${
NUMPY_VERSION
}
-py2.7-linux"
)
SET
(
EGG_NAME
"numpy-
${
NUMPY_VERSION
}
-py2.7-linux"
)
ENDIF
(
APPLE
)
FOREACH
(
suffix x86_64 intel fat64 fat32 universal
)
LIST
(
APPEND PYTHON_NUMPY_INCLUDE_DIR
${
PY_SITE_PACKAGES_PATH
}
/
${
EGG_NAME
}
-
${
suffix
}
.egg/numpy/core/include
)
ENDFOREACH
()
ENDIF
(
WIN32
)
ExternalProject_Add
(
numpy
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY https://github.com/numpy/numpy.git
GIT_TAG
${
NUMPY_TAG_VERSION
}
CONFIGURE_COMMAND
""
UPDATE_COMMAND
""
PREFIX
${
NUMPY_SOURCES_DIR
}
BUILD_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py build
INSTALL_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
BUILD_IN_SOURCE 1
DEPENDS python setuptools cython
)
####################################################################################
##################################### WHEEL ########################################
SET
(
WHEEL_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/wheel
)
ExternalProject_Add
(
wheel
${
EXTERNAL_PROJECT_LOG_ARGS
}
URL https://pypi.python.org/packages/source/w/wheel/wheel-0.29.0.tar.gz
PREFIX
${
WHEEL_SOURCES_DIR
}
CONFIGURE_COMMAND
""
UPDATE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
BUILD_IN_SOURCE 1
DEPENDS python setuptools
)
####################################################################################
################################### PROTOBUF #######################################
SET
(
PY_PROTOBUF_SOURCES_DIR
${
PYTHON_SOURCES_DIR
}
/protobuf
)
ExternalProject_Add
(
python-protobuf
${
EXTERNAL_PROJECT_LOG_ARGS
}
URL https://pypi.python.org/packages/e0/b0/0a1b364fe8a7d177b4b7d4dca5b798500dc57a7273b93cca73931b305a6a/protobuf-3.1.0.post1.tar.gz
URL_MD5 38b5fb160c768d2f8444d0c6d637ff91
PREFIX
${
PY_PROTOBUF_SOURCES_DIR
}
BUILD_IN_SOURCE 1
PATCH_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py build
INSTALL_COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py install
DEPENDS python setuptools six
)
####################################################################################
LIST
(
APPEND external_project_dependencies python setuptools six cython wheel python-protobuf numpy
)
ENDIF
(
PYTHONINTERP_FOUND
)
IF
(
WITH_PYTHON
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录