Use __import__() to avoid leaking imported names to the executed script.

parent 4acb16a2
# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
import sys
from pkg_resources import require
require(%(spec)r)
del require
__import__('pkg_resources').require(%(spec)r)
__file__ = %(dev_path)r
if sys.version_info < (3, 0):
if __import__('sys').version_info < (3, 0):
execfile(__file__)
else:
exec(compile(open(__file__).read(), __file__, 'exec'))
# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
import pkg_resources
pkg_resources.run_script(%(spec)r, %(script_name)r)
__import__('pkg_resources').run_script(%(spec)r, %(script_name)r)
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