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
254c2f03
Commit
254c2f03
authored
Jan 04, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CommandSpec in get_script_header
parent
3ababa26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+8
-5
No files found.
setuptools/command/easy_install.py
View file @
254c2f03
...
...
@@ -36,6 +36,7 @@ import site
import
struct
import
contextlib
import
subprocess
import
shlex
from
setuptools
import
Command
from
setuptools.sandbox
import
run_setup
...
...
@@ -1884,10 +1885,10 @@ class CommandSpec(list):
Construct a command spec from a simple string, assumed to represent
the full name to an executable.
"""
return
cls
.
_for_jython
(
string
)
or
cls
([
string
])
return
JythonCommandSpec
.
from_string
(
string
)
or
cls
([
string
])
def
install_options
(
self
,
script_text
):
self
.
options
.
extend
(
self
.
_extract_options
(
script_text
))
self
.
options
=
shlex
.
split
(
self
.
_extract_options
(
script_text
))
cmdline
=
subprocess
.
list2cmdline
(
self
)
if
not
isascii
(
cmdline
):
self
.
options
[:
0
]
=
[
'-x'
]
...
...
@@ -1977,9 +1978,11 @@ class ScriptWriter(object):
def
get_script_header
(
cls
,
script_text
,
executable
=
None
,
wininst
=
False
):
# for backward compatibility
warnings
.
warn
(
"Use get_header"
,
DeprecationWarning
)
executable
=
executable
or
CommandSpec
.
launcher
executable
=
"python.exe"
if
wininst
else
nt_quote_arg
(
executable
)
return
cls
.
get_header
(
script_text
,
executable
)
if
wininst
:
executable
=
"python.exe"
cmd
=
CommandSpec
.
from_param
(
executable
)
cmd
.
install_options
(
script_text
)
return
cmd
.
as_header
()
@
classmethod
def
get_args
(
cls
,
dist
,
header
=
None
):
...
...
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