Jannis Leidel committed c2679a6

Added warning in case a globally installed setuptools is found and the --distribute option is used because the fake-setuptools of distribute inside the venv will be ignored in favor of the global setuptools.

Comments (0)

Files changed (1)

         source = 'distribute-0.6.8.tar.gz'
         project_name = 'distribute'
         bootstrap_script = DISTRIBUTE_SETUP_PY
+        try:
+            # check if the global Python has distribute installed or plain
+            # setuptools
+            import pkg_resources
+            if not hasattr(pkg_resources, '_distribute'):
+                raise ImportError
+        except ImportError:
+            logger.notify("A globally installed setuptools was found. "
+                "Use the --no-site-packages option to use distribute in "
+                "the virtualenv.")
     search_dirs = ['.', os.path.dirname(__file__), join(os.path.dirname(__file__), 'virtualenv_support')]
     if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv':