From ee164921a68843bba8665b33431a54fa96c3cc88 Mon Sep 17 00:00:00 2001 From: MRXLT Date: Sat, 9 May 2020 02:44:07 +0000 Subject: [PATCH] support py37 --- python/setup.py.client.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/setup.py.client.in b/python/setup.py.client.in index 58061f7c..c46a5873 100644 --- a/python/setup.py.client.in +++ b/python/setup.py.client.in @@ -26,7 +26,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] +py_version = sys.version_info def python_version(): return [int(v) for v in platform.python_version().split(".")] @@ -39,7 +39,12 @@ 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'] + if py_version[0] == 2: + lib_list = ['libpython2.7.so.1.0', 'libssl.so.10', 'libcrypto.so.10'] + elif py_version[1] == 6: + lib_list = ['libpython3.6m.so.1.0', 'libssl.so.10', 'libcrypto.so.10'] + elif py_version[1] == 7: + lib_list = ['libpython3.7m.so.1.0', 'libssl.so.10', 'libcrypto.so.10'] os.popen('mkdir -p paddle_serving_client/lib') for lib in lib_list: r = os.popen('whereis {}'.format(lib)) -- GitLab