diff options
| author | Jon Waltman <jonathan.waltman@gmail.com> | 2012-11-11 01:33:52 -0600 |
|---|---|---|
| committer | Jon Waltman <jonathan.waltman@gmail.com> | 2012-11-11 01:33:52 -0600 |
| commit | e26f6807079e2b2e9f30a47425977489ca661087 (patch) | |
| tree | eaf882a4347d079e6b1b6a6ada8b453d52465d21 | |
| parent | 54734b4220674fe8bc07da0fa9765e6ea161590c (diff) | |
| download | sphinx-e26f6807079e2b2e9f30a47425977489ca661087.tar.gz | |
Avoid unknown option warnings for use_2to3 in setup.py under Python 2.
| -rw-r--r-- | setup.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 ) |
