Commits

Jon Waltman committed dfccd80

Avoid unknown option warnings for use_2to3 in setup.py under Python 2.

Comments (0)

Files changed (1)

     print('ERROR: Sphinx requires at least Python 2.5 to run.')
     sys.exit(1)
 
+# tell distribute to use 2to3 with our own fixers
+extra = {}
+if sys.version_info >= (3, 0):
+    extra.update(
+        use_2to3=True,
+        use_2to3_fixers=['custom_fixers']
+    )
+
 # Provide a "compile_catalog" command that also creates the translated
 # JavaScript files if Babel is available.
 
     },
     install_requires=requires,
     cmdclass=cmdclass,
-    use_2to3=True,
-    use_2to3_fixers=['custom_fixers'],
+    **extra
 )