mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
remove 2to3. #1350.
This commit is contained in:
parent
b00d97a86f
commit
956d6286bf
9
setup.py
9
setup.py
@ -52,14 +52,6 @@ if (3, 0) <= sys.version_info < (3, 3):
|
||||
else: # 2.6, 2.7, 3.3 or later
|
||||
requires.append('Jinja2>=2.3')
|
||||
|
||||
# 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.
|
||||
|
||||
@ -196,5 +188,4 @@ setup(
|
||||
},
|
||||
install_requires=requires,
|
||||
cmdclass=cmdclass,
|
||||
**extra
|
||||
)
|
||||
|
14
tests/run.py
14
tests/run.py
@ -15,8 +15,6 @@ import sys
|
||||
from os import path, chdir, listdir, environ
|
||||
import shutil
|
||||
|
||||
from six import PY3
|
||||
|
||||
|
||||
testroot = path.dirname(__file__) or '.'
|
||||
if 'BUILD_TEST_PATH' in environ:
|
||||
@ -28,15 +26,9 @@ else:
|
||||
newroot = path.join(newroot, listdir(newroot)[0], 'tests')
|
||||
|
||||
shutil.rmtree(newroot, ignore_errors=True)
|
||||
|
||||
if PY3:
|
||||
print('Copying and converting sources to build/lib/tests...')
|
||||
from distutils.util import copydir_run_2to3
|
||||
copydir_run_2to3(testroot, newroot)
|
||||
else:
|
||||
# just copying test directory to parallel testing
|
||||
print('Copying sources to build/lib/tests...')
|
||||
shutil.copytree(testroot, newroot)
|
||||
# just copying test directory to parallel testing
|
||||
print('Copying sources to build/lib/tests...')
|
||||
shutil.copytree(testroot, newroot)
|
||||
|
||||
# always test the sphinx package from build/lib/
|
||||
sys.path.insert(0, path.abspath(path.join(newroot, path.pardir)))
|
||||
|
Loading…
Reference in New Issue
Block a user