Commits

Reinout van Rees committed 35dc6e1

Detecting buildout by looking in os.environ['_'] to see if it is a buildout
command. If that is the case: do not fake setuptools, just let yourself be
installed as a buildout-managed egg.

Comments (0)

Files changed (1)

 VERSION = "0.6.5"
 
 from setuptools import setup, find_packages
+import os
 import sys
 scripts = []
 
     return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and
             sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1])
 
+def _buildout_marker():
+    command = os.environ.get('_')
+    if command:
+        return 'buildout' in os.path.basename(command)
+
 def _being_installed():
+    if _buildout_marker():
+        # Installed by buildout, don't mess with a global setuptools.
+        return False
     # easy_install marker
     return 'install' in sys.argv[1:] or _easy_install_marker()
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.