提交 21f377c9 编写于 作者: M MRXLT

fix required package

上级 43395230
......@@ -23,10 +23,19 @@ from setuptools import setup, Distribution, Extension
from setuptools import find_packages
from setuptools import setup
from paddle_serving_client.version import serving_client_version
from pkg_resources import DistributionNotFound, get_distribution
def python_version():
return [int(v) for v in platform.python_version().split(".")]
def find_package(pkgname):
try:
get_distribution(pkgname)
return True
except DistributionNotFound:
return False
def copy_lib():
os.popen('mkdir -p paddle_serving_client/lib')
for lib in ['libpython2.7.so.1.0', 'libssl.so.10', 'libcrypto.so.10']:
......@@ -41,9 +50,12 @@ if '${PACK}' == 'ON':
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0','paddlepaddle'
'six >= 1.10.0', 'protobuf >= 3.1.0'
]
if not find_package("paddlepaddle") and not find_package("paddlepaddle-gpu"):
REQUIRED_PACKAGES.append("paddlepaddle")
packages=['paddle_serving_client',
'paddle_serving_client.proto',
'paddle_serving_client.io',
......
......@@ -22,6 +22,14 @@ from setuptools import setup, Distribution, Extension
from setuptools import find_packages
from setuptools import setup
from paddle_serving_server.version import serving_server_version
from pkg_resources import DistributionNotFound, get_distribution
def find_package(pkgname):
try:
get_distribution(pkgname)
return True
except DistributionNotFound:
return False
def python_version():
return [int(v) for v in platform.python_version().split(".")]
......@@ -29,10 +37,13 @@ def python_version():
max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0','paddlepaddle',
'paddle_serving_client'
'six >= 1.10.0', 'protobuf >= 3.1.0',
'paddle_serving_client', 'flask'
]
if not find_package("paddlepaddle") and not find_package("paddlepaddle-gpu"):
REQUIRED_PACKAGES.append("paddlepaddle")
packages=['paddle_serving_server',
'paddle_serving_server.proto']
......@@ -73,4 +84,3 @@ setup(
],
license='Apache 2.0',
keywords=('paddle-serving serving-server deployment industrial easy-to-use'))
......@@ -22,6 +22,14 @@ from setuptools import setup, Distribution, Extension
from setuptools import find_packages
from setuptools import setup
from paddle_serving_server_gpu.version import serving_server_version
from pkg_resources import DistributionNotFound, get_distribution
def find_package(pkgname):
try:
get_distribution(pkgname)
return True
except DistributionNotFound:
return False
def python_version():
return [int(v) for v in platform.python_version().split(".")]
......@@ -29,10 +37,13 @@ def python_version():
max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0','paddlepaddle',
'six >= 1.10.0', 'protobuf >= 3.1.0',
'paddle_serving_client'
]
if not find_package("paddlepaddle") and not find_package("paddlepaddle-gpu"):
REQUIRED_PACKAGES.append("paddlepaddle")
packages=['paddle_serving_server_gpu',
'paddle_serving_server_gpu.proto']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册