[pkg] don't run 2to3 in setup.py

We can now run directly on python3 (3.3+, and at least as far as running tests).

Closes #265740

authorJulien Cristau <julien.cristau@logilab.fr>
changeset9332c143b37c
branchdefault
phasepublic
hiddenno
parent revision#5059277a93df Only read/write func.__name__ and class.__self__
child revision#7009bcb5187a [modutils] Use a cache when abspathing sys.path for file_from_modpath., #8944b8da95a8 [testlib] stop using internal unittest _addSkip method, #98e5b8cfc8e3 [testlib] display InnerTest name in error reports
files modified by this revision
setup.py
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1411402115 -7200
# Mon Sep 22 18:08:35 2014 +0200
# Node ID 9332c143b37cfe6ee816b61692ebf8888c0c1a50
# Parent 5059277a93dffb33d1a6eabcebea4de2b1b7b563
[pkg] don't run 2to3 in setup.py

We can now run directly on python3 (3.3+, and at least as far as running
tests).

Closes #265740

diff --git a/setup.py b/setup.py
@@ -36,16 +36,11 @@
1  except ImportError:
2      from distutils.core import setup
3      from distutils.command import install_lib
4      USE_SETUPTOOLS = 0
5 
6 -try:
7 -    # python3
8 -    from distutils.command.build_py import build_py_2to3 as build_py
9 -except ImportError:
10 -    # python2.x
11 -    from distutils.command.build_py import build_py
12 +from distutils.command.build_py import build_py
13 
14  sys.modules.pop('__pkginfo__', None)
15  # import optional features
16  __pkginfo__ = __import__("__pkginfo__")
17  # import required features
@@ -135,18 +130,10 @@
18              basedir = os.path.join(self.build_lib, base)
19              for directory in include_dirs:
20                  dest = join(basedir, directory)
21                  shutil.rmtree(dest, ignore_errors=True)
22                  shutil.copytree(directory, dest)
23 -                if sys.version_info >= (3, 0):
24 -                    # process manually python file in include_dirs (test data)
25 -                    from distutils.util import run_2to3
26 -                    # brackets are NOT optional here for py3k compat
27 -                    print('running 2to3 on', dest)
28 -                    run_2to3([dest])
29 -
30 -
31 
32 
33  def install(**kwargs):
34      """setup entry point"""
35      if USE_SETUPTOOLS: