Skip to content

Commit

Permalink
Newer bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
faassen committed Mar 21, 2011
1 parent 076efc3 commit f981adc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def quote(c):
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.
Expand Down Expand Up @@ -169,7 +170,8 @@ def normalize_to_url(option, opt_str, value, parser):
if options.use_distribute:
setup_args['no_fake'] = True
ez['use_setuptools'](**setup_args)
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.
Expand Down

0 comments on commit f981adc

Please sign in to comment.