Add support for python 3 by requiring python3-openid in case of python3.
Also use 2to3 in case of python3.
Fixes #18.
Fixes #19.
diff --git a/setup.py b/setup.py
index 8074441..c0f7e89 100644
--- a/setup.py
+++ b/setup.py
@@ -12,6 +12,15 @@
<http://github.com/mitsuhiko/flask-openid/zipball/master#egg=Flask-OpenID-dev>`_
"""
from setuptools import setup
+import sys
+
+extra = {}
+install_requires = ['Flask>=0.10.1']
+if sys.version_info >= (3,):
+ install_requires.append('python3-openid>=2.0')
+ extra['use_2to3'] = True
+else:
+ install_requires.append('python-openid>=2.0')
setup(
@@ -26,10 +35,7 @@
py_modules=['flask_openid'],
zip_safe=False,
platforms='any',
- install_requires=[
- 'Flask>=0.3',
- 'python-openid>=2.0'
- ],
+ install_requires=install_requires,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
@@ -39,5 +45,6 @@
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
- ]
+ ],
+ **extra
)