Skip to content

Commit 3401ea4

Browse files
committed
Only install enum34 on python before 3.4
enum34 is a package that backports python 3.4 enum functionality to earlier versions. However, it only includes the functionality as of 3.4. If other packages use more recent enum functionality, this will break them. (See #17 for more details.) The solution is just to install enum34 only when the python version is pre-3.4.
1 parent 5d3896a commit 3401ea4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
except ImportError:
77
from distutils.core import setup
88

9-
install_requires = ['requests>=2.4.2', 'enum34']
9+
install_requires = ['requests>=2.4.2']
10+
11+
if sys.version_info < (3, 4, 0):
12+
install_requires.append('enum34')
1013

1114
if sys.version_info < (2, 7, 9):
1215
warnings.warn(

0 commit comments

Comments
 (0)