Skip to content

Commit fd14639

Browse files
committed
Add conditional dependency on enum34 for Python 2.7
1 parent 92ab77c commit fd14639

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ pyparsing
22
six
33
pyperclip
44
contextlib2
5+
enum34
6+
subprocess32

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
":sys_platform=='win32'": ['pyreadline'],
7272
# Python 3.4 and earlier require contextlib2 for temporarily redirecting stderr and stdout
7373
":python_version<'3.5'": ['contextlib2'],
74+
# Python 3.3 and earlier require enum34 backport of enum module from Python 3.4
75+
":python_version<'3.4'": ['enum34'],
7476
# Python 2.7 also requires subprocess32
7577
":python_version<'3.0'": ['subprocess32'],
7678
}
@@ -81,6 +83,8 @@
8183
INSTALL_REQUIRES.append('pyreadline')
8284
if sys.version_info < (3, 5):
8385
INSTALL_REQUIRES.append('contextlib2')
86+
if sys.version_info < (3, 4):
87+
INSTALL_REQUIRES.append('enum34')
8488
if sys.version_info < (3, 0):
8589
INSTALL_REQUIRES.append('subprocess32')
8690

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ setenv =
1212
[testenv:py27]
1313
deps =
1414
codecov
15+
enum34
1516
mock
1617
pyparsing
1718
pyperclip
@@ -28,6 +29,7 @@ commands =
2829
[testenv:py27-win]
2930
deps =
3031
codecov
32+
enum34
3133
mock
3234
pyparsing
3335
pyperclip

0 commit comments

Comments
 (0)