Commit 69ddb628 authored by Tres Seaver's avatar Tres Seaver

Merge pull request #218 from fpatz/master

Potential fix for https://github.com/buildout/buildout/issues/217
parents e209ee18 b8f50552
...@@ -88,6 +88,10 @@ if not options.allow_site_packages: ...@@ -88,6 +88,10 @@ if not options.allow_site_packages:
# We can't remove these reliably # We can't remove these reliably
if hasattr(site, 'getsitepackages'): if hasattr(site, 'getsitepackages'):
for sitepackage_path in site.getsitepackages(): for sitepackage_path in site.getsitepackages():
# Strip all site-packages directories from sys.path that
# are not sys.prefix; this is because on Windows
# sys.prefix is a site-package directory.
if sitepackage_path != sys.prefix:
sys.path[:] = [x for x in sys.path if sitepackage_path not in x] sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
setup_args = dict(to_dir=tmpeggs, download_delay=0) setup_args = dict(to_dir=tmpeggs, download_delay=0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment