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
a66a5c08
Commit
a66a5c08
authored
Mar 13, 2009
by
Sidnei da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- close_fds is not supported on win32
parent
627a5886
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+7
-6
No files found.
src/zc/buildout/easy_install.py
View file @
a66a5c08
...
@@ -51,6 +51,7 @@ logger = logging.getLogger('zc.buildout.easy_install')
...
@@ -51,6 +51,7 @@ logger = logging.getLogger('zc.buildout.easy_install')
url_match
=
re
.
compile
(
'[a-z0-9+.-]+://'
).
match
url_match
=
re
.
compile
(
'[a-z0-9+.-]+://'
).
match
is_win32
=
sys
.
platform
==
'win32'
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
is_jython
=
sys
.
platform
.
startswith
(
'java'
)
if
is_jython
:
if
is_jython
:
...
@@ -85,7 +86,7 @@ def _get_version(executable):
...
@@ -85,7 +86,7 @@ def _get_version(executable):
stdin
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
stderr
=
subprocess
.
STDOUT
,
close_fds
=
True
)
close_fds
=
not
win32
)
i
,
o
=
(
p
.
stdin
,
p
.
stdout
)
i
,
o
=
(
p
.
stdin
,
p
.
stdout
)
i
.
close
()
i
.
close
()
version
=
o
.
read
().
strip
()
version
=
o
.
read
().
strip
()
...
@@ -130,7 +131,7 @@ def _get_index(executable, index_url, find_links, allow_hosts=('*',)):
...
@@ -130,7 +131,7 @@ def _get_index(executable, index_url, find_links, allow_hosts=('*',)):
clear_index_cache = _indexes.clear
clear_index_cache = _indexes.clear
if
sys.platform == '
win32
'
:
if
is_win32
:
# work around spawn lamosity on windows
# work around spawn lamosity on windows
# XXX need safe quoting (see the subproces.list2cmdline) and test
# XXX need safe quoting (see the subproces.list2cmdline) and test
def _safe_arg(arg):
def _safe_arg(arg):
...
@@ -962,7 +963,7 @@ def _script(module_name, attrs, path, dest, executable, arguments,
...
@@ -962,7 +963,7 @@ def _script(module_name, attrs, path, dest, executable, arguments,
initialization
):
initialization
):
generated
=
[]
generated
=
[]
script
=
dest
script
=
dest
if
sys
.
platform
==
'win32'
:
if
is_win32
:
dest
+=
'-script.py'
dest
+=
'-script.py'
contents
=
script_template
%
dict
(
contents
=
script_template
%
dict
(
...
@@ -975,7 +976,7 @@ def _script(module_name, attrs, path, dest, executable, arguments,
...
@@ -975,7 +976,7 @@ def _script(module_name, attrs, path, dest, executable, arguments,
)
)
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
if
sys
.
platform
==
'win32'
:
if
is_win32
:
# generate exe file and give the script a magic name:
# generate exe file and give the script a magic name:
exe
=
script
+
'.exe'
exe
=
script
+
'.exe'
new_data
=
pkg_resources
.
resource_string
(
'setuptools'
,
'cli.exe'
)
new_data
=
pkg_resources
.
resource_string
(
'setuptools'
,
'cli.exe'
)
...
@@ -1019,7 +1020,7 @@ if __name__ == '__main__':
...
@@ -1019,7 +1020,7 @@ if __name__ == '__main__':
def
_pyscript
(
path
,
dest
,
executable
):
def
_pyscript
(
path
,
dest
,
executable
):
generated
=
[]
generated
=
[]
script
=
dest
script
=
dest
if
sys
.
platform
==
'win32'
:
if
is_win32
:
dest
+=
'-script.py'
dest
+=
'-script.py'
contents
=
py_script_template
%
dict
(
contents
=
py_script_template
%
dict
(
...
@@ -1028,7 +1029,7 @@ def _pyscript(path, dest, executable):
...
@@ -1028,7 +1029,7 @@ def _pyscript(path, dest, executable):
)
)
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
if
sys
.
platform
==
'win32'
:
if
is_win32
:
# generate exe file and give the script a magic name:
# generate exe file and give the script a magic name:
exe
=
script
+
'.exe'
exe
=
script
+
'.exe'
open
(
exe
,
'wb'
).
write
(
open
(
exe
,
'wb'
).
write
(
...
...
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