Commits

Lennart Regebro committed ed408dc Draft

Issue #306: Even if 2to3 is used, we build in-place under Python 2.

Comments (0)

Files changed (3)

   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

setuptools/command/develop.py

 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"""
                 " 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

setuptools/command/test.py

 
 
     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