提交 07fdaf79 编写于 作者: T tensor-tang

1. use local lib as runtime path of paddle for mkl shared libs.

2. fix path of bin files
上级 6f045f9a
...@@ -23,12 +23,20 @@ with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f: ...@@ -23,12 +23,20 @@ with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']: if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
setup_requires+=["opencv-python"] setup_requires+=["opencv-python"]
mkl_shared_libs='${MKL_SHARED_LIBS}' # the prefix is sys.prefix which should always be usr
paddle_bin_dir = 'local/opt/paddle/bin'
paddle_bins = ['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage',
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer',
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model',
'${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main']
paddle_rt_lib_dir = 'local/lib'
paddle_rt_libs = []
mkl_libs = [] mkl_shared_libs='${MKL_SHARED_LIBS}'
if mkl_shared_libs != '': if mkl_shared_libs != '':
mkl_libs += mkl_shared_libs.split(';') paddle_rt_libs += mkl_shared_libs.split(';')
print mkl_libs print paddle_rt_libs
setup(name='paddlepaddle', setup(name='paddlepaddle',
version='${PADDLE_VERSION}', version='${PADDLE_VERSION}',
...@@ -49,10 +57,6 @@ setup(name='paddlepaddle', ...@@ -49,10 +57,6 @@ setup(name='paddlepaddle',
}, },
scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'], scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'],
distclass=BinaryDistribution, distclass=BinaryDistribution,
data_files=[('/usr/local/opt/paddle/bin', data_files=[(paddle_bin_dir, paddle_bins),
['${PADDLE_BINARY_DIR}/paddle/scripts/paddle_usage', (paddle_rt_lib_dir, paddle_rt_libs)]
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_trainer',
'${PADDLE_BINARY_DIR}/paddle/trainer/paddle_merge_model',
'${PADDLE_BINARY_DIR}/paddle/pserver/paddle_pserver_main']),
('/usr/local/opt/paddle/lib', mkl_libs)]
) )
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册