Skip to content

Commit f8b3962

Browse files
committed
Use enum34 backport when Enum is not available
1 parent 6a96d37 commit f8b3962

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

setup.py

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

13+
requirements = [
14+
"six>=1.10.0",
15+
"graphene>=2.1.3",
16+
"SQLAlchemy",
17+
"singledispatch>=3.4.0.3",
18+
]
19+
try:
20+
import Enum
21+
except ImportError:
22+
requirements.append("enum34 >= 1.1.6")
1323

1424
setup(
1525
name="graphene-sqlalchemy",
@@ -36,11 +46,6 @@
3646
],
3747
keywords="api graphql protocol rest relay graphene",
3848
packages=find_packages(exclude=["tests"]),
39-
install_requires=[
40-
"six>=1.10.0",
41-
"graphene>=2.1.3",
42-
"SQLAlchemy",
43-
"singledispatch>=3.4.0.3",
44-
],
49+
install_requires=requirements,
4550
tests_require=["pytest>=2.7.2", "mock", "sqlalchemy_utils"],
4651
)

0 commit comments

Comments
 (0)