summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Waltman <jonathan.waltman@gmail.com>2012-11-11 01:33:52 -0600
committerJon Waltman <jonathan.waltman@gmail.com>2012-11-11 01:33:52 -0600
commite26f6807079e2b2e9f30a47425977489ca661087 (patch)
treeeaf882a4347d079e6b1b6a6ada8b453d52465d21
parent54734b4220674fe8bc07da0fa9765e6ea161590c (diff)
downloadsphinx-e26f6807079e2b2e9f30a47425977489ca661087.tar.gz
Avoid unknown option warnings for use_2to3 in setup.py under Python 2.
-rw-r--r--setup.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 060e33a2..03f8e8e1 100644
--- a/setup.py
+++ b/setup.py
@@ -53,6 +53,14 @@ if sys.version_info < (2, 5):
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.
@@ -189,6 +197,5 @@ setup(
},
install_requires=requires,
cmdclass=cmdclass,
- use_2to3=True,
- use_2to3_fixers=['custom_fixers'],
+ **extra
)