aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt1
-rwxr-xr-xsetuptools/command/develop.py4
-rw-r--r--setuptools/command/test.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 8fc1c3ff..c594a103 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@ CHANGES
as the egg link would go to the Python 2 source. Linking to the 2to3'd code
in build/lib makes it work, although you will have to rebuild the module
before testing it.
+* Issue #306: Even if 2to3 is used, we build in-place under Python 2.
------
0.6.28
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