Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
57bc6238
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
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:
...
@@ -38,6 +38,7 @@ addons:
-
curl
-
curl
-
lcov
-
lcov
-
graphviz
-
graphviz
-
swig
before_install
:
before_install
:
-
|
-
|
if [ ${JOB} == "BUILD_AND_TEST" ]; then
if [ ${JOB} == "BUILD_AND_TEST" ]; then
...
@@ -51,7 +52,7 @@ before_install:
...
@@ -51,7 +52,7 @@ before_install:
fi
fi
-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; 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
-
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
:
script
:
-
paddle/scripts/travis/main.sh
-
paddle/scripts/travis/main.sh
notifications
:
notifications
:
...
...
paddle/api/paddle_api_config.py.in
浏览文件 @
57bc6238
...
@@ -16,3 +16,4 @@ GFLAGS_LOCATION="@GFLAGS_LOCATION@"
...
@@ -16,3 +16,4 @@ GFLAGS_LOCATION="@GFLAGS_LOCATION@"
CBLAS_LIBRARIES="@CBLAS_LIBS@"
CBLAS_LIBRARIES="@CBLAS_LIBS@"
CUDA_LIBRARIES="@CUDA_LIBRARIES@"
CUDA_LIBRARIES="@CUDA_LIBRARIES@"
WITH_COVERALLS="@ON_COVERALLS@"
paddle/api/paddle_ld_flags.py
浏览文件 @
57bc6238
...
@@ -48,6 +48,7 @@ try:
...
@@ -48,6 +48,7 @@ try:
self
.
glog_libs
=
LIBGLOG_LIBRARY
self
.
glog_libs
=
LIBGLOG_LIBRARY
self
.
with_gflags
=
PaddleLDFlag
.
cmake_bool
(
WITH_GFLAGS
)
self
.
with_gflags
=
PaddleLDFlag
.
cmake_bool
(
WITH_GFLAGS
)
self
.
with_coverage
=
PaddleLDFlag
.
cmake_bool
(
WITH_COVERALLS
)
self
.
gflags_libs
=
GFLAGS_LIBRARIES
self
.
gflags_libs
=
GFLAGS_LIBRARIES
self
.
gflags_location
=
GFLAGS_LOCATION
self
.
gflags_location
=
GFLAGS_LOCATION
self
.
cblas_libs
=
CBLAS_LIBRARIES
self
.
cblas_libs
=
CBLAS_LIBRARIES
...
@@ -97,6 +98,8 @@ try:
...
@@ -97,6 +98,8 @@ try:
libs
.
append
(
self
.
normalize_flag
(
self
.
gflags_libs
))
libs
.
append
(
self
.
normalize_flag
(
self
.
gflags_libs
))
if
self
.
with_gpu
:
if
self
.
with_gpu
:
libs
.
append
(
self
.
normalize_flag
(
self
.
curt
))
libs
.
append
(
self
.
normalize_flag
(
self
.
curt
))
if
self
.
with_coverage
:
libs
.
append
(
"-fprofile-arcs"
)
return
" "
.
join
(
filter
(
lambda
l
:
len
(
l
)
!=
0
,
libs
))
return
" "
.
join
(
filter
(
lambda
l
:
len
(
l
)
!=
0
,
libs
))
def
normalize_flag
(
self
,
cmake_flag
):
def
normalize_flag
(
self
,
cmake_flag
):
...
@@ -133,8 +136,14 @@ try:
...
@@ -133,8 +136,14 @@ try:
return
False
return
False
else
:
else
:
return
True
return
True
def
c_flag
(
self
):
if
self
.
with_coverage
:
return
[
"-fprofile-arcs"
,
"-ftest-coverage"
,
"-O0"
,
"-g"
]
else
:
return
None
except
ImportError
:
except
ImportError
:
class
PaddleLDFlag
(
object
):
class
PaddleLDFlag
(
object
):
def
ldflag_str
(
self
):
def
ldflag_str
(
self
):
pass
pass
def
c_flag
(
self
):
pass
paddle/scripts/travis/build_and_test.sh
浏览文件 @
57bc6238
...
@@ -3,6 +3,8 @@ source ./common.sh
...
@@ -3,6 +3,8 @@ source ./common.sh
CMAKE_EXTRA
=
""
CMAKE_EXTRA
=
""
if
[[
"
$TRAVIS_OS_NAME
"
==
"osx"
]]
;
then
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"
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
fi
...
...
paddle/setup.py.in
浏览文件 @
57bc6238
...
@@ -31,8 +31,8 @@ is_lin = (system == 'linux')
...
@@ -31,8 +31,8 @@ is_lin = (system == 'linux')
# because generate paddle LDFLAGS is too complicated to do in setup.py
# because generate paddle LDFLAGS is too complicated to do in setup.py
# it just read COMAKE generated LDFLAGS.
# it just read COMAKE generated LDFLAGS.
extra_links = []
extra_links = []
ldflags
= api.paddle_ld_flags.PaddleLDFlag()
obj
= api.paddle_ld_flags.PaddleLDFlag()
ldflags =
ldflags
.ldflag_str()
ldflags =
obj
.ldflag_str()
if ldflags is not None:
if ldflags is not None:
extra_links.extend(ldflags.split(" "))
extra_links.extend(ldflags.split(" "))
...
@@ -51,13 +51,20 @@ elif is_osx == True:
...
@@ -51,13 +51,20 @@ elif is_osx == True:
include_dirs = [np.get_include(), "../"] # include numpy and paddle.
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",
setup(name="py_paddle",
version="@PADDLE_VERSION@",
version="@PADDLE_VERSION@",
ext_modules=[
ext_modules=[
Extension('py_paddle._swig_paddle', # Build SWIG Extension.
Extension('py_paddle._swig_paddle', # Build SWIG Extension.
['Paddle_wrap.cxx'],
['Paddle_wrap.cxx'],
include_dirs = include_dirs,
include_dirs = include_dirs,
extra_link_args = extra_links
extra_link_args = extra_links,
**attr
)
)
],
],
packages=['py_paddle'],
packages=['py_paddle'],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录