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
97254d56
Commit
97254d56
authored
Sep 14, 2006
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed windows problems
parent
92fd30a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+15
-3
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+3
-0
zc.recipe.testrunner/src/zc/recipe/testrunner/tests.py
zc.recipe.testrunner/src/zc/recipe/testrunner/tests.py
+1
-0
No files found.
src/zc/buildout/buildout.py
View file @
97254d56
...
@@ -66,9 +66,10 @@ class Options(dict):
...
@@ -66,9 +66,10 @@ class Options(dict):
class
Buildout
(
dict
):
class
Buildout
(
dict
):
def
__init__
(
self
,
config_file
,
cloptions
):
def
__init__
(
self
,
config_file
,
cloptions
,
windows_restart
=
False
):
config_file
=
os
.
path
.
abspath
(
config_file
)
config_file
=
os
.
path
.
abspath
(
config_file
)
self
.
_config_file
=
config_file
self
.
_config_file
=
config_file
self
.
__windows_restart
=
windows_restart
if
not
os
.
path
.
exists
(
config_file
):
if
not
os
.
path
.
exists
(
config_file
):
print
'Warning: creating'
,
config_file
print
'Warning: creating'
,
config_file
open
(
config_file
,
'w'
).
write
(
'[buildout]
\
n
parts =
\
n
'
)
open
(
config_file
,
'w'
).
write
(
'[buildout]
\
n
parts =
\
n
'
)
...
@@ -568,6 +569,14 @@ class Buildout(dict):
...
@@ -568,6 +569,14 @@ class Buildout(dict):
if
not
upgraded
:
if
not
upgraded
:
return
return
if
sys
.
platform
==
'win32'
and
not
self
.
__windows_restart
:
args
=
map
(
zc
.
buildout
.
easy_install
.
_safe_arg
,
sys
.
argv
)
args
.
insert
(
1
,
'-W'
)
if
not
__debug__
:
args
.
insert
(
0
,
'-O'
)
args
.
insert
(
0
,
sys
.
executable
)
os
.
execv
(
sys
.
executable
,
args
)
self
.
_logger
.
info
(
"Upgraded:
\
n
%s;
\
n
restarting."
,
self
.
_logger
.
info
(
"Upgraded:
\
n
%s;
\
n
restarting."
,
",
\
n
"
.
join
([(
"%s version %s"
",
\
n
"
.
join
([(
"%s version %s"
%
(
dist
.
project_name
,
dist
.
version
)
%
(
dist
.
project_name
,
dist
.
version
)
...
@@ -784,15 +793,18 @@ def main(args=None):
...
@@ -784,15 +793,18 @@ def main(args=None):
config_file
=
'buildout.cfg'
config_file
=
'buildout.cfg'
verbosity
=
0
verbosity
=
0
options
=
[]
options
=
[]
windows_restart
=
False
while
args
:
while
args
:
if
args
[
0
][
0
]
==
'-'
:
if
args
[
0
][
0
]
==
'-'
:
op
=
orig_op
=
args
.
pop
(
0
)
op
=
orig_op
=
args
.
pop
(
0
)
op
=
op
[
1
:]
op
=
op
[
1
:]
while
op
and
op
[
0
]
in
'vqh'
:
while
op
and
op
[
0
]
in
'vqh
W
'
:
if
op
[
0
]
==
'v'
:
if
op
[
0
]
==
'v'
:
verbosity
+=
10
verbosity
+=
10
elif
op
[
0
]
==
'q'
:
elif
op
[
0
]
==
'q'
:
verbosity
-=
10
verbosity
-=
10
elif
op
[
0
]
==
'W'
:
windows_restart
=
True
else
:
else
:
_help
()
_help
()
op
=
op
[
1
:]
op
=
op
[
1
:]
...
@@ -833,7 +845,7 @@ def main(args=None):
...
@@ -833,7 +845,7 @@ def main(args=None):
try
:
try
:
try
:
try
:
buildout
=
Buildout
(
config_file
,
options
)
buildout
=
Buildout
(
config_file
,
options
,
windows_restart
)
getattr
(
buildout
,
command
)(
args
)
getattr
(
buildout
,
command
)(
args
)
except
zc
.
buildout
.
UserError
,
v
:
except
zc
.
buildout
.
UserError
,
v
:
_error
(
str
(
v
))
_error
(
str
(
v
))
...
...
src/zc/buildout/tests.py
View file @
97254d56
...
@@ -522,6 +522,7 @@ def test_suite():
...
@@ -522,6 +522,7 @@ def test_suite():
(re.compile('
#!\S+python\S*'), '#!python'),
(re.compile('
#!\S+python\S*'), '#!python'),
(
re
.
compile
(
'
\
S+s
a
mple-(
\
w+)
'
), r'
/
sample
-
\
1
'),
(
re
.
compile
(
'
\
S+s
a
mple-(
\
w+)
'
), r'
/
sample
-
\
1
'),
(re.compile('
-
py
\
d
[.]
\
d
.
egg
'), r'
-
py2
.
3.
egg
'),
(re.compile('
-
py
\
d
[.]
\
d
.
egg
'), r'
-
py2
.
3.
egg
'),
(re.compile(r'
\\
+
'), '
/
'),
])
])
),
),
...
@@ -559,6 +560,8 @@ def test_suite():
...
@@ -559,6 +560,8 @@ def test_suite():
'setuptools.egg'),
'setuptools.egg'),
(re.compile('zc.buildout-
\
S+-py
\
d.
\
d.egg
'
),
(re.compile('zc.buildout-
\
S+-py
\
d.
\
d.egg
'
),
'zc.buildout.egg'),
'zc.buildout.egg'),
(re.compile('(
\
n
?)- ([a-zA-Z_.-]+)-script.py
\
n
-
\
\
2.exe
\
n
'),
'
\
\
1-
\
\
2
\
n
'),
]),
]),
)
)
))
))
...
...
zc.recipe.testrunner/src/zc/recipe/testrunner/tests.py
View file @
97254d56
...
@@ -57,6 +57,7 @@ def test_suite():
...
@@ -57,6 +57,7 @@ def test_suite():
(
re
.
compile
(
'#!
\
S+py
t
hon
\
S*
'
), '
#!python'),
(
re
.
compile
(
'#!
\
S+py
t
hon
\
S*
'
), '
#!python'),
(
re
.
compile
(
'
\
S+s
a
mple-(
\
w+)
'
), r'
/
sample
-
\
1
'),
(
re
.
compile
(
'
\
S+s
a
mple-(
\
w+)
'
), r'
/
sample
-
\
1
'),
(re.compile('
-
([
^-
]
+
)
-
py
\
d
[.]
\
d
.
egg
'), r'
-
py2
.
3.
egg
'),
(re.compile('
-
([
^-
]
+
)
-
py
\
d
[.]
\
d
.
egg
'), r'
-
py2
.
3.
egg
'),
(re.compile(r'
\\
+
'), '
/
'),
])
])
),
),
...
...
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