1. Jason R. Coombs
  2. zc.buildout-bootstrap


ga...@62d5b8a3-27da-0310-9561-8e5933582275  committed 1987d9c

merge gary-1.5.2 branch

  • Participants
  • Parent commits acb6e02
  • Branches default

Comments (0)

Files changed (1)

File bootstrap.py

View file
 import site
 sys.path[:] = clean_path
 for k, v in sys.modules.items():
-    if (hasattr(v, '__path__') and
+    if k in ('setuptools', 'pkg_resources') or (
+        hasattr(v, '__path__') and
         len(v.__path__)==1 and
         not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))):
         # This is a namespace package.  Remove it.
     if options.use_distribute:
         setup_args['no_fake'] = True
-    reload(sys.modules['pkg_resources'])
+    if 'pkg_resources' in sys.modules:
+        reload(sys.modules['pkg_resources'])
     import pkg_resources
     # This does not (always?) update the default working set.  We will
     # do it.