Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
70cceb0c
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
1 年多 前同步成功
通知
696
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看板
提交
70cceb0c
编写于
9月 11, 2016
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile paddle swig bug on MAC OS
上级
ec2a3eb3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
6 deletion
+34
-6
paddle/api/paddle_ld_flags.py
paddle/api/paddle_ld_flags.py
+15
-2
paddle/setup.py.in
paddle/setup.py.in
+19
-4
未找到文件。
paddle/api/paddle_ld_flags.py
浏览文件 @
70cceb0c
...
...
@@ -15,6 +15,19 @@
try
:
from
paddle_api_config
import
*
import
os.path
import
platform
system
=
platform
.
system
().
lower
()
is_osx
=
(
system
==
'darwin'
)
is_win
=
(
system
==
'windows'
)
is_lin
=
(
system
==
'linux'
)
if
is_lin
:
whole_start
=
"-Wl,--whole-archive"
whole_end
=
"-Wl,--no-whole-archive"
elif
is_osx
:
whole_start
=
""
whole_end
=
""
LIB_DIRS
=
[
"math"
,
'utils'
,
'parameter'
,
"gserver"
,
"api"
,
"cuda"
,
"pserver"
,
"trainer"
]
PARENT_LIB_DIRS
=
[
'proto'
]
...
...
@@ -56,9 +69,9 @@ try:
def
libs_str
(
self
):
libs
=
[
"-Wl,--whole-archive"
,
whole_start
,
"-lpaddle_gserver"
,
"-Wl,--no-whole-archive"
,
whole_end
,
"-lpaddle_pserver"
,
"-lpaddle_trainer_lib"
,
"-lpaddle_network"
,
...
...
paddle/setup.py.in
浏览文件 @
70cceb0c
...
...
@@ -17,6 +17,14 @@
from setuptools import setup, Extension
import numpy as np
import api.paddle_ld_flags
import platform
system = platform.system().lower()
is_osx = (system == 'darwin')
is_win = (system == 'windows')
is_lin = (system == 'linux')
# The extra links will passed from COMAKE
# because generate paddle LDFLAGS is too complicated to do in setup.py
...
...
@@ -34,17 +42,24 @@ try:
except:
pass
if is_lin == True:
extra_links = ["-Xlinker", '-start-group'] + extra_links + ["-Xlinker", "-end-group"]
elif is_osx == True:
extra_links = ["-Wl,-all_load"] + extra_links
include_dirs = [np.get_include(), "../"] # include numpy and paddle.
setup(name="py_paddle",
version="@PADDLE_VERSION@",
ext_modules=[
Extension('py_paddle._swig_paddle', # Build SWIG Extension.
['Paddle_wrap.cxx'],
extra_link_args=["-Xlinker", '-start-group'] +
extra_links + ["-Xlinker", "-end-group"]
['Paddle_wrap.cxx'],
include_dirs = include_dirs,
extra_link_args = extra_links
)
],
packages=['py_paddle'],
include_dirs =
[np.get_include(), "../"], # include numpy and paddle.
include_dirs =
include_dirs,
install_requires = [
'numpy>=1.8.0', # The numpy is required.
'protobuf>=2.4.1' # The paddle protobuf version
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录