summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMartin v. L?wis <martin@v.loewis.de>2009-09-12 23:12:36 +0200
committerMartin v. L?wis <martin@v.loewis.de>2009-09-12 23:12:36 +0200
commit6700c61855cd8b778dee03c103d1fc03ce142935 (patch)
tree0295e042e105c4cf2561743b1dfff00ea36b957e /setup.py
parent3bf1da1d590ba88542148d7404f8697e57486f6c (diff)
downloadpython-setuptools-bitbucket-6700c61855cd8b778dee03c103d1fc03ce142935.tar.gz
Run 2to3 on doctest source.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 3a47a09c..d91ea069 100755
--- a/setup.py
+++ b/setup.py
@@ -18,11 +18,12 @@ if sys.version_info >= (3,):
outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1)
if copied and outf.endswith(".py"):
outfiles_2to3.append(outf)
- util.run_2to3(outfiles_2to3)
+ if copied and outf.endswith('api_tests.txt'):
+ # XXX support this in distutils as well
+ from lib2to3.main import main
+ main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')])
- # XXX support this in distutils as well
- from lib2to3.main import main
- main('lib2to3.fixes', ['-wd', os.path.join(tmp_src, 'tests', 'api_tests.txt')])
+ util.run_2to3(outfiles_2to3)
# arrange setup to use the copy
sys.path.insert(0, tmp_src)