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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.buildout
Commits
edf74c4a
Commit
edf74c4a
authored
Aug 21, 2012
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from agroszer/master
fixed dev.py on windows
parents
637c7a05
c14c9783
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+9
-8
No files found.
src/zc/buildout/easy_install.py
View file @
edf74c4a
...
...
@@ -1059,19 +1059,20 @@ def _distutils_script(path, dest, script_content, initialization, rsetup):
def
_create_script
(
contents
,
dest
):
generated
=
[]
script
=
dest
if
is_win32
:
dest
+=
'-script.py'
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
if
is_win32
:
# generate exe file and give the script a magic name:
exe
=
script
+
'.exe'
new_data
=
pkg_resources
.
resource_string
(
'distribute'
,
'cli.exe'
)
if
not
os
.
path
.
exists
(
exe
)
or
(
open
(
exe
,
'rb'
).
read
()
!=
new_data
):
win32_exe
=
os
.
path
.
splitext
(
dest
)[
0
]
# remove ".py"
if
win32_exe
.
endswith
(
'-script'
):
win32_exe
=
win32_exe
[:
-
7
]
# remove "-script"
win32_exe
=
win32_exe
+
'.exe'
# add ".exe"
new_data
=
pkg_resources
.
resource_string
(
'setuptools'
,
'cli.exe'
)
if
not
os
.
path
.
exists
(
win32_exe
)
or
(
open
(
win32_exe
,
'rb'
).
read
()
!=
new_data
):
# Only write it if it's different.
open
(
exe
,
'wb'
).
write
(
new_data
)
generated
.
append
(
exe
)
open
(
win32_
exe
,
'wb'
).
write
(
new_data
)
generated
.
append
(
win32_
exe
)
if
changed
:
open
(
dest
,
'w'
).
write
(
contents
)
...
...
@@ -1139,7 +1140,7 @@ def _pyscript(path, dest, rsetup):
# generate exe file and give the script a magic name:
exe
=
script
+
'.exe'
open
(
exe
,
'wb'
).
write
(
pkg_resources
.
resource_string
(
'
distribute
'
,
'cli.exe'
)
pkg_resources
.
resource_string
(
'
setuptools
'
,
'cli.exe'
)
)
generated
.
append
(
exe
)
...
...
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