Skip to content

Commit b62d7f3

Browse files
committed
Use enum34 backport when Enum is not available
1 parent 8a2f020 commit b62d7f3

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

setup.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@
1010
ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))
1111
)
1212

13+
requirements = [
14+
# To keep things simple, we only support newer versions of Graphene
15+
"graphene>=2.1.3,<3",
16+
# Tests fail with 1.0.19
17+
"SQLAlchemy>=1.1,<2",
18+
"six>=1.10.0,<2",
19+
"singledispatch>=3.4.0.3,<4",
20+
]
21+
try:
22+
import Enum
23+
except ImportError:
24+
requirements.append("enum34 >= 1.1.6")
25+
1326
tests_require = [
1427
"pytest==4.3.1",
1528
"mock==2.0.0",
@@ -42,14 +55,7 @@
4255
],
4356
keywords="api graphql protocol rest relay graphene",
4457
packages=find_packages(exclude=["tests"]),
45-
install_requires=[
46-
# To keep things simple, we only support newer versions of Graphene
47-
"graphene>=2.1.3,<3",
48-
# Tests fail with 1.0.19
49-
"SQLAlchemy>=1.1,<2",
50-
"six>=1.10.0,<2",
51-
"singledispatch>=3.4.0.3,<4",
52-
],
58+
install_requires=requirements,
5359
extras_require={
5460
"dev": [
5561
"tox==3.7.0", # Should be kept in sync with tox.ini

0 commit comments

Comments
 (0)