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
e7f9dab0
Commit
e7f9dab0
authored
Jan 24, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'launch' hook, based on pip.utils.setuptools_build
parent
3b7b733c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
CHANGES.txt
CHANGES.txt
+15
-0
setuptools/launch.py
setuptools/launch.py
+28
-0
No files found.
CHANGES.txt
View file @
e7f9dab0
...
@@ -2,6 +2,21 @@
...
@@ -2,6 +2,21 @@
CHANGES
CHANGES
=======
=======
19.6
----
* Added a new entry script ``setuptools.launch``,
implementing the shim found in
``pip.util.setuptools_build``. Use this command to launch
distutils-only packages under setuptools in the same way that
pip does, causing the setuptools monkeypatching of distutils
to be invoked prior to invoking a script. Useful for debugging
or otherwise installing a distutils-only package under
setuptools when pip isn't available or otherwise does not
expose the desired functionality. For example::
$ python -m setuptools.launch setup.py develop
19.5
19.5
----
----
...
...
setuptools/launch.py
0 → 100644
View file @
e7f9dab0
"""
Launch the Python script on the command line after
setuptools is bootstrapped via import.
"""
# Note that setuptools gets imported implicitly by the
# invocation of this script using python -m setuptools.launch
import
tokenize
import
sys
def
load
():
"""
Load the script in sys.argv[1] and run it as if it had
been invoked naturally.
"""
globals
()[
'__file__'
]
=
sys
.
argv
[
1
]
sys
.
argv
[:]
=
sys
.
argv
[
1
:]
open_
=
getattr
(
tokenize
,
'open'
,
open
)
script
=
open_
(
__file__
).
read
()
norm_script
=
script
.
replace
(
'
\
\
r
\
\
n'
,
'
\
\
n'
)
return
compile
(
norm_script
,
__file__
,
'exec'
)
if
__name__
==
'__main__'
:
exec
(
load
())
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