Commit 4df44da1 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract function for unloading pkg_resources. Ref #345.

parent cf6639df
......@@ -175,10 +175,15 @@ def use_setuptools(
# otherwise, unload pkg_resources to allow the downloaded version to
# take precedence.
del pkg_resources, sys.modules['pkg_resources']
del pkg_resources
_unload_pkg_resources()
return _do_download(version, download_base, to_dir, download_delay)
def _unload_pkg_resources():
del sys.modules['pkg_resources']
def _clean_check(cmd, target):
"""
Run the command to download target.
......
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