Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
340dcabf
Commit
340dcabf
authored
Apr 14, 2012
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop using os.spawn (and _safe_arg where it isn't needed).
parent
f0fdf356
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
28 deletions
+6
-28
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+6
-28
No files found.
src/zc/buildout/buildout.py
View file @
340dcabf
...
@@ -31,6 +31,7 @@ import os
...
@@ -31,6 +31,7 @@ import os
import
pkg_resources
import
pkg_resources
import
re
import
re
import
shutil
import
shutil
import
subprocess
import
sys
import
sys
import
tempfile
import
tempfile
import
UserDict
import
UserDict
...
@@ -46,11 +47,6 @@ pkg_resources_loc = pkg_resources.working_set.find(
...
@@ -46,11 +47,6 @@ pkg_resources_loc = pkg_resources.working_set.find(
_isurl
=
re
.
compile
(
'([a-zA-Z0-9+.-]+)://'
).
match
_isurl
=
re
.
compile
(
'([a-zA-Z0-9+.-]+)://'
).
match
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
if
is_jython
:
import
subprocess
class
MissingOption
(
zc
.
buildout
.
UserError
,
KeyError
):
class
MissingOption
(
zc
.
buildout
.
UserError
,
KeyError
):
"""A required option was missing.
"""A required option was missing.
"""
"""
...
@@ -878,15 +874,11 @@ class Buildout(UserDict.DictMixin):
...
@@ -878,15 +874,11 @@ class Buildout(UserDict.DictMixin):
)
)
# Restart
# Restart
args
=
map
(
zc
.
buildout
.
easy_install
.
_safe_arg
,
sys
.
argv
)
args
=
sys
.
argv
[:]
if
not
__debug__
:
if
not
__debug__
:
args
.
insert
(
0
,
'-O'
)
args
.
insert
(
0
,
'-O'
)
args
.
insert
(
0
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
sys
.
executable
))
args
.
insert
(
0
,
sys
.
executable
)
sys
.
exit
(
subprocess
.
call
(
args
))
if
is_jython
:
sys
.
exit
(
subprocess
.
Popen
([
sys
.
executable
]
+
list
(
args
)).
wait
())
else
:
sys
.
exit
(
os
.
spawnv
(
os
.
P_WAIT
,
sys
.
executable
,
args
))
def
_load_extensions
(
self
):
def
_load_extensions
(
self
):
__doing__
=
'Loading extensions.'
__doing__
=
'Loading extensions.'
...
@@ -945,22 +937,8 @@ class Buildout(UserDict.DictMixin):
...
@@ -945,22 +937,8 @@ class Buildout(UserDict.DictMixin):
setup
=
setup
,
setup
=
setup
,
__file__
=
setup
,
__file__
=
setup
,
))
))
if
is_jython
:
zc
.
buildout
.
easy_install
.
call_subprocess
(
arg_list
=
list
()
[
sys
.
executable
,
tsetup
]
+
args
)
for
a
in
args
:
arg_list
.
append
(
zc
.
buildout
.
easy_install
.
_safe_arg
(
a
))
subprocess
.
Popen
(
[
zc
.
buildout
.
easy_install
.
_safe_arg
(
sys
.
executable
)]
+
list
(
tsetup
)
+
arg_list
).
wait
()
else
:
os
.
spawnl
(
os
.
P_WAIT
,
sys
.
executable
,
zc
.
buildout
.
easy_install
.
_safe_arg
(
sys
.
executable
),
tsetup
,
*
[
zc
.
buildout
.
easy_install
.
_safe_arg
(
a
)
for
a
in
args
])
finally
:
finally
:
os
.
close
(
fd
)
os
.
close
(
fd
)
os
.
remove
(
tsetup
)
os
.
remove
(
tsetup
)
...
...
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