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:
parent
c134b218b7
commit
4e715ff0bf
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.')
|
||||
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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user