From df237230814af74c449611cebee6ef7f9b89f273 Mon Sep 17 00:00:00 2001 From: MRXLT Date: Fri, 27 Mar 2020 20:09:20 +0800 Subject: [PATCH] fix client package for py3 --- python/setup.py.client.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/setup.py.client.in b/python/setup.py.client.in index 86b3c331..65649c50 100644 --- a/python/setup.py.client.in +++ b/python/setup.py.client.in @@ -25,6 +25,7 @@ from setuptools import setup from paddle_serving_client.version import serving_client_version from pkg_resources import DistributionNotFound, get_distribution +py_version = sys.version_info[0] def python_version(): return [int(v) for v in platform.python_version().split(".")] @@ -37,8 +38,9 @@ def find_package(pkgname): return False def copy_lib(): + lib_list = ['libpython2.7.so.1.0', 'libssl.so.10', 'libcrypto.so.10'] if py_version == 2 else ['libpython3.6m.so.1.0', 'libssl.so.10', 'libcrypto.so.10'] os.popen('mkdir -p paddle_serving_client/lib') - for lib in ['libpython2.7.so.1.0', 'libssl.so.10', 'libcrypto.so.10']: + for lib in lib_list: r = os.popen('whereis {}'.format(lib)) text = r.read() os.popen('cp {} ./paddle_serving_client/lib'.format(text.strip().split(' ')[1])) -- GitLab