diff --git a/python/setup.py.in b/python/setup.py.in index 4b3fd1a7794876e68ea6d44329f127e4c44fa71a..36438d357306090b1d70c4f2138fa7474fb592f3 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -23,12 +23,20 @@ with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f: if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']: 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 != '': - mkl_libs += mkl_shared_libs.split(';') -print mkl_libs + paddle_rt_libs += mkl_shared_libs.split(';') +print paddle_rt_libs setup(name='paddlepaddle', version='${PADDLE_VERSION}', @@ -49,10 +57,6 @@ setup(name='paddlepaddle', }, scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle'], distclass=BinaryDistribution, - data_files=[('/usr/local/opt/paddle/bin', - ['${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']), - ('/usr/local/opt/paddle/lib', mkl_libs)] + data_files=[(paddle_bin_dir, paddle_bins), + (paddle_rt_lib_dir, paddle_rt_libs)] )