aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/develop.py4
-rw-r--r--setuptools/command/test.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index c8bef72e..709e349c 100755
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -3,7 +3,7 @@ from distutils.util import convert_path, subst_vars
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
from distutils.errors import DistutilsError, DistutilsOptionError
-import os, setuptools, glob
+import os, sys, setuptools, glob
class develop(easy_install):
"""Set up package for development"""
@@ -84,7 +84,7 @@ class develop(easy_install):
" installation directory", p, normalize_path(os.curdir))
def install_for_development(self):
- if getattr(self.distribution, 'use_2to3', False):
+ if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
# If we run 2to3 we can not do this inplace:
# Ensure metadata is up-to-date
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 59c10e84..e5cb9bb5 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -81,7 +81,7 @@ class test(Command):
def with_project_on_sys_path(self, func):
- if getattr(self.distribution, 'use_2to3', False):
+ if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False):
# If we run 2to3 we can not do this inplace:
# Ensure metadata is up-to-date