Commits

Martin von Löwis committed a3bc4fb

Add Python 3 support.

Comments (0)

Files changed (1)

 try:
     from setuptools import setup
 except ImportError:
-    print 'setuptools not installed, using distutils.core'
-    print 'please ignore error message about "install_requires"'
+    print('setuptools not installed, using distutils.core')
+    print('please ignore error message about "install_requires"')
     from distutils.core import setup
 
 version = '0.7.3'
 except ImportError:
     pass
 
+cmdclass = {}
+try:
+    from distutils.command.build_py import build_py_2to3
+    cmdclass['build_py'] = build_py_2to3
+except ImportError:
+    pass
+
+
 setup(name='Creoleparser',
       version=version,
       install_requires=['Genshi>=0.4'],
       packages=['creoleparser'],
       license = 'MIT',
       #zip_safe = False,
+      cmdclass = cmdclass,
       classifiers = [
         'Development Status :: 4 - Beta',
         'Environment :: Web Environment',