mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Avoid unknown option warnings for use_2to3 in setup.py under Python 2.
This commit is contained in:
11
setup.py
11
setup.py
@@ -53,6 +53,14 @@ if sys.version_info < (2, 5):
|
|||||||
print('ERROR: Sphinx requires at least Python 2.5 to run.')
|
print('ERROR: Sphinx requires at least Python 2.5 to run.')
|
||||||
sys.exit(1)
|
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
|
# Provide a "compile_catalog" command that also creates the translated
|
||||||
# JavaScript files if Babel is available.
|
# JavaScript files if Babel is available.
|
||||||
|
|
||||||
@@ -189,6 +197,5 @@ setup(
|
|||||||
},
|
},
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
cmdclass=cmdclass,
|
cmdclass=cmdclass,
|
||||||
use_2to3=True,
|
**extra
|
||||||
use_2to3_fixers=['custom_fixers'],
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user