summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-08-29 11:16:29 -0400
committerBrett Cannon <brett@python.org>2014-08-29 11:16:29 -0400
commit131810f8df6431ffef5d0cf345d67aeec7c3c605 (patch)
treed4c1219e564ccffc8feeb3b42785038a47cc14e6 /setup.py
parent2995e293950edc39b0466d1274affc1136c066c8 (diff)
downloadpylint-131810f8df6431ffef5d0cf345d67aeec7c3c605.tar.gz
Modernize to the point of working for Python 2.7 still
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index 45b76be..c1ab8f4 100644
--- a/setup.py
+++ b/setup.py
@@ -20,6 +20,7 @@
# with pylint. If not, see <http://www.gnu.org/licenses/>.
"""Generic Setup script, takes package info from __pkginfo__.py file.
"""
+from __future__ import print_function
__docformat__ = "restructuredtext en"
import os
@@ -38,14 +39,7 @@ except ImportError:
from distutils.command import install_lib
USE_SETUPTOOLS = 0
-try:
- # pylint: disable=no-name-in-module
- # python3
- from distutils.command.build_py import build_py_2to3 as build_py
-except ImportError:
- # pylint: disable=no-name-in-module
- # python2.x
- from distutils.command.build_py import build_py
+from distutils.command.build_py import build_py
sys.modules.pop('__pkginfo__', None)
# import optional features
@@ -144,7 +138,7 @@ class MyInstallLib(install_lib.install_lib):
# process manually python file in include_dirs (test data)
# pylint: disable=no-name-in-module
from distutils.util import run_2to3
- print('running 2to3 on', dest)
+ print(('running 2to3 on', dest))
run_2to3([dest])
# override this since pip/easy_install attempt to byte compile test data