Skip to content

Commit aa9eb47

Browse files
Use static python_version dependency configuration in setup.py
1 parent 95e5718 commit aa9eb47

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

setup.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@
5353
'termcolor',
5454
'tqdm',
5555
'wrapt',
56+
'mock;python_version<"2"',
57+
'bz2file;python_version<"2"',
58+
'functools32;python_version<"2"',
59+
'futures;python_version<"2"',
60+
'psutil;python_version<"3.3"',
61+
'enum34;python_version<"3.4"'
5662
]
5763

5864
TESTS_REQUIRE = [
@@ -65,24 +71,6 @@
6571
# 'tensorflow-docs @ git+https://github.com/tensorflow/docs#egg=tensorflow-docs', # pylint: disable=line-too-long
6672
]
6773

68-
if sys.version_info.major == 3:
69-
# Packages only for Python 3
70-
pass
71-
else:
72-
# Packages only for Python 2
73-
TESTS_REQUIRE.append('mock')
74-
REQUIRED_PKGS.append('bz2file')
75-
REQUIRED_PKGS.append('functools32')
76-
REQUIRED_PKGS.append('futures') # concurrent.futures
77-
78-
if sys.version_info < (3, 4):
79-
# enum introduced in Python 3.4
80-
REQUIRED_PKGS.append('enum34')
81-
82-
if sys.version_info < (3, 3):
83-
# shutil.disk_usage was introduced in Python 3.3, use psutil instead.
84-
REQUIRED_PKGS.append('psutil')
85-
8674
# Static files needed by datasets.
8775
DATASET_FILES = [
8876
'image/caltech101_labels.txt',

0 commit comments

Comments
 (0)