[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>
changeset35a41648eb94
branchdefault
phasedraft
hiddenyes
parent revision#957c532d7b6e [py3k] execfile no longer exists
child revision#924533da2ad7 Delete obsolete README.Python3, #8e787de87792 Use six.moves.input instead of lgc.compat.raw_input, #df622f789c57 [debian] unify packaging, #e0558e17bbe4 Only read/write func.__name__ and class.__self__, #58f8c4347498 prepare 0.63.0, #5ba2c363f3b9 [configuration] extract a YAML-friendly build_config_struct function from generate_config (closes #204933), #e34aef673d8e [modutils] Use a cache when abspathing sys.path for file_from_modpath., #a65a91025df9 [testlib] display InnerTest name in error reports, #317d9c123f6f Only read/write func.__name__ and class.__self__, #553549856f2f [testlib] stop using internal unittest _addSkip method
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 35a41648eb948ea4ee937462d381465517b4ef2f
# Parent 957c532d7b6e943c67c6b91030a072ff72a63e20
[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: