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
8e4311ca
Commit
8e4311ca
authored
Aug 21, 2012
by
Adam Groszer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
probably fixed dev.py on windows
parent
777d4bab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
dev.py
dev.py
+1
-0
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+10
-8
No files found.
dev.py
View file @
8e4311ca
...
@@ -106,6 +106,7 @@ if subprocess.call(
...
@@ -106,6 +106,7 @@ if subprocess.call(
pkg_resources
.
working_set
.
add_entry
(
'src'
)
pkg_resources
.
working_set
.
add_entry
(
'src'
)
import
zc.buildout.easy_install
import
zc.buildout.easy_install
#from dbgp.client import brk; brk('127.0.0.1')
zc
.
buildout
.
easy_install
.
scripts
(
zc
.
buildout
.
easy_install
.
scripts
(
[
'zc.buildout'
],
pkg_resources
.
working_set
,
sys
.
executable
,
'bin'
)
[
'zc.buildout'
],
pkg_resources
.
working_set
,
sys
.
executable
,
'bin'
)
...
...
src/zc/buildout/easy_install.py
View file @
8e4311ca
...
@@ -1059,19 +1059,21 @@ def _distutils_script(path, dest, script_content, initialization, rsetup):
...
@@ -1059,19 +1059,21 @@ def _distutils_script(path, dest, script_content, initialization, rsetup):
def
_create_script
(
contents
,
dest
):
def
_create_script
(
contents
,
dest
):
generated
=
[]
generated
=
[]
script
=
dest
script
=
dest
if
is_win32
:
dest
+=
'-script.py'
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
changed
=
not
(
os
.
path
.
exists
(
dest
)
and
open
(
dest
).
read
()
==
contents
)
if
is_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'
#from dbgp.client import brk; brk('127.0.0.1')
new_data
=
pkg_resources
.
resource_string
(
'distribute'
,
'cli.exe'
)
win32_exe
=
os
.
path
.
splitext
(
dest
)[
0
]
if
not
os
.
path
.
exists
(
exe
)
or
(
open
(
exe
,
'rb'
).
read
()
!=
new_data
):
if
win32_exe
.
endswith
(
'-script'
):
win32_exe
=
win32_exe
[:
-
7
]
win32_exe
=
win32_exe
+
'.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.
# Only write it if it's different.
open
(
exe
,
'wb'
).
write
(
new_data
)
open
(
win32_
exe
,
'wb'
).
write
(
new_data
)
generated
.
append
(
exe
)
generated
.
append
(
win32_
exe
)
if
changed
:
if
changed
:
open
(
dest
,
'w'
).
write
(
contents
)
open
(
dest
,
'w'
).
write
(
contents
)
...
@@ -1139,7 +1141,7 @@ def _pyscript(path, dest, rsetup):
...
@@ -1139,7 +1141,7 @@ def _pyscript(path, dest, rsetup):
# 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
(
pkg_resources
.
resource_string
(
'
distribute
'
,
'cli.exe'
)
pkg_resources
.
resource_string
(
'
setuptools
'
,
'cli.exe'
)
)
)
generated
.
append
(
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