Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
SummerGao.
Paddle
提交
57bc6238
P
Paddle
项目概览
SummerGao.
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
57bc6238
编写于
11月 08, 2016
作者:
Y
Yu Yang
提交者:
gangliao
11月 07, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enable swig unittest in travis-ci (#394)
* Init * Add numpy deps * Refine
上级
f06f4dfb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
5 deletion
+25
-5
.travis.yml
.travis.yml
+2
-1
paddle/api/paddle_api_config.py.in
paddle/api/paddle_api_config.py.in
+1
-0
paddle/api/paddle_ld_flags.py
paddle/api/paddle_ld_flags.py
+10
-1
paddle/scripts/travis/build_and_test.sh
paddle/scripts/travis/build_and_test.sh
+2
-0
paddle/setup.py.in
paddle/setup.py.in
+10
-3
未找到文件。
.travis.yml
浏览文件 @
57bc6238
...
...
@@ -38,6 +38,7 @@ addons:
-
curl
-
lcov
-
graphviz
-
swig
before_install
:
-
|
if [ ${JOB} == "BUILD_AND_TEST" ]; then
...
...
@@ -51,7 +52,7 @@ before_install:
fi
-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
-
pip install wheel protobuf sphinx breathe recommonmark
-
pip install wheel protobuf sphinx breathe recommonmark
virtualenv numpy
script
:
-
paddle/scripts/travis/main.sh
notifications
:
...
...
paddle/api/paddle_api_config.py.in
浏览文件 @
57bc6238
...
...
@@ -16,3 +16,4 @@ GFLAGS_LOCATION="@GFLAGS_LOCATION@"
CBLAS_LIBRARIES="@CBLAS_LIBS@"
CUDA_LIBRARIES="@CUDA_LIBRARIES@"
WITH_COVERALLS="@ON_COVERALLS@"
paddle/api/paddle_ld_flags.py
浏览文件 @
57bc6238
...
...
@@ -48,6 +48,7 @@ try:
self
.
glog_libs
=
LIBGLOG_LIBRARY
self
.
with_gflags
=
PaddleLDFlag
.
cmake_bool
(
WITH_GFLAGS
)
self
.
with_coverage
=
PaddleLDFlag
.
cmake_bool
(
WITH_COVERALLS
)
self
.
gflags_libs
=
GFLAGS_LIBRARIES
self
.
gflags_location
=
GFLAGS_LOCATION
self
.
cblas_libs
=
CBLAS_LIBRARIES
...
...
@@ -97,6 +98,8 @@ try:
libs
.
append
(
self
.
normalize_flag
(
self
.
gflags_libs
))
if
self
.
with_gpu
:
libs
.
append
(
self
.
normalize_flag
(
self
.
curt
))
if
self
.
with_coverage
:
libs
.
append
(
"-fprofile-arcs"
)
return
" "
.
join
(
filter
(
lambda
l
:
len
(
l
)
!=
0
,
libs
))
def
normalize_flag
(
self
,
cmake_flag
):
...
...
@@ -133,8 +136,14 @@ try:
return
False
else
:
return
True
def
c_flag
(
self
):
if
self
.
with_coverage
:
return
[
"-fprofile-arcs"
,
"-ftest-coverage"
,
"-O0"
,
"-g"
]
else
:
return
None
except
ImportError
:
class
PaddleLDFlag
(
object
):
def
ldflag_str
(
self
):
pass
def
c_flag
(
self
):
pass
paddle/scripts/travis/build_and_test.sh
浏览文件 @
57bc6238
...
...
@@ -3,6 +3,8 @@ source ./common.sh
CMAKE_EXTRA
=
""
if
[[
"
$TRAVIS_OS_NAME
"
==
"osx"
]]
;
then
CMAKE_EXTRA
=
"-DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib"
else
CMAKE_EXTRA
=
"-DWITH_SWIG_PY=ON"
fi
...
...
paddle/setup.py.in
浏览文件 @
57bc6238
...
...
@@ -31,8 +31,8 @@ is_lin = (system == 'linux')
# because generate paddle LDFLAGS is too complicated to do in setup.py
# it just read COMAKE generated LDFLAGS.
extra_links = []
ldflags
= api.paddle_ld_flags.PaddleLDFlag()
ldflags =
ldflags
.ldflag_str()
obj
= api.paddle_ld_flags.PaddleLDFlag()
ldflags =
obj
.ldflag_str()
if ldflags is not None:
extra_links.extend(ldflags.split(" "))
...
...
@@ -51,13 +51,20 @@ elif is_osx == True:
include_dirs = [np.get_include(), "../"] # include numpy and paddle.
extra_c = obj.c_flag()
attr=dict()
if extra_c is not None:
attr["extra_compile_args"] = extra_c
setup(name="py_paddle",
version="@PADDLE_VERSION@",
ext_modules=[
Extension('py_paddle._swig_paddle', # Build SWIG Extension.
['Paddle_wrap.cxx'],
include_dirs = include_dirs,
extra_link_args = extra_links
extra_link_args = extra_links,
**attr
)
],
packages=['py_paddle'],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录