Skip to content

Commit ef7378c

Browse files
committed
Install importlib if we are on 2.6
1 parent 54d83b2 commit ef7378c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from distutils.core import setup
1+
from setuptools import setup
22
from os.path import dirname, join
33

44
try:
@@ -7,6 +7,14 @@
77
except IOError:
88
README = '<no description>'
99

10+
install_requires = ['oauthlib']
11+
12+
try:
13+
import importlib
14+
except ImportError:
15+
install_requires.append('importlib')
16+
17+
1018
setup(
1119
name='django-oauth2-admin',
1220
version='0.1',
@@ -24,8 +32,6 @@
2432
'Programming Language :: Python',
2533
],
2634
license='MIT',
27-
install_requires=[
28-
'oauthlib',
29-
],
35+
install_requires=install_requires,
3036
packages=['oauthadmin'],
3137
)

0 commit comments

Comments
 (0)