提交 5a829a9e 编写于 作者: W wuzewu

add setup install requires enum in python 2.x

上级 c780dd78
...@@ -16,15 +16,27 @@ from __future__ import absolute_import ...@@ -16,15 +16,27 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import platform
from setuptools import find_packages from setuptools import find_packages
from setuptools import setup from setuptools import setup
from paddlehub.version import hub_version from paddlehub.version import hub_version
def python_version():
return [int(v) for v in platform.python_version().split(".")]
max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [ REQUIRED_PACKAGES = [
'numpy >= 1.12.0', 'six >= 1.10.0', 'protobuf >= 3.1.0', 'pyyaml', 'Pillow', 'numpy >= 1.12.0', 'six >= 1.10.0', 'protobuf >= 3.1.0', 'pyyaml', 'Pillow',
"visualdl >= 1.3.0" "visualdl >= 1.3.0"
] ]
if max_version < 3:
REQUIRED_PACKAGES += ["enum"]
setup( setup(
name='paddlehub', name='paddlehub',
version=hub_version.replace('-', ''), version=hub_version.replace('-', ''),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册