summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2012-12-31 22:54:59 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2012-12-31 22:54:59 +0100
commita25569e742b4884d2198c0ea6a6f804e657f6f6d (patch)
tree841812458a62648f36d17368e131362c4d8a3239 /setup.py
parentf85b696fc10076be3e9fcf34085ef864f2121026 (diff)
downloadsqlparse-a25569e742b4884d2198c0ea6a6f804e657f6f6d.tar.gz
Python 3 is now fully supported without any patches.
This change makes the extras/py3k stuff obsolete and installing for Python 3 is as easy as "python3 setup.py install". setup.py uses distribute's use_2to3 flag to automatically run 2to3 when Python 3 is used. \o/ Happy New Year, everyone!
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 7421e34..6b71b12 100755
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
import re
+import sys
from setuptools import setup, find_packages
@@ -81,6 +82,11 @@ DOWNLOAD_URL = (
)
+kwargs = {}
+if sys.version_info[0] == 3:
+ kwargs['use_2to3'] = True
+
+
setup(
name='sqlparse',
version=VERSION,
@@ -109,4 +115,5 @@ setup(
'Topic :: Software Development'
],
scripts=['bin/sqlformat'],
+ **kwargs
)