Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
04ee0d93
Commit
04ee0d93
authored
Jun 30, 2014
by
Arfrever Frehtes Taifersar Arahesis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use __import__() to avoid leaking imported names to the executed script.
parent
4acb16a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
setuptools/script (dev).tmpl
setuptools/script (dev).tmpl
+2
-5
setuptools/script.tmpl
setuptools/script.tmpl
+1
-2
No files found.
setuptools/script (dev).tmpl
View file @
04ee0d93
# 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'))
setuptools/script.tmpl
View file @
04ee0d93
# 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)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment