Commit dca452f0 authored by Dweep Shah's avatar Dweep Shah

Uses an existing method to delete pkg_resources

parent 03cc3be9
......@@ -125,12 +125,7 @@ def _do_download(version, download_base, to_dir, download_delay):
# Remove previously-imported pkg_resources if present (see
# https://bitbucket.org/pypa/setuptools/pull-request/7/ for details).
if 'pkg_resources' in sys.modules:
del_modules = [
name for name in sys.modules
if name.startswith('pkg_resources')
]
for mod_name in del_modules:
del sys.modules[mod_name]
_unload_pkg_resources()
import setuptools
setuptools.bootstrap_install_from = egg
......
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