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
19165bc0
Commit
19165bc0
authored
Jan 25, 2013
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved picked version printer so we can use print_()
parent
837a4acf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
38 deletions
+42
-38
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+42
-2
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+0
-36
No files found.
src/zc/buildout/buildout.py
View file @
19165bc0
...
...
@@ -334,8 +334,10 @@ class Buildout(DictMixin):
bool_option
(
options
,
'use-dependency-links'
))
zc
.
buildout
.
easy_install
.
allow_picked_versions
(
bool_option
(
options
,
'allow-picked-versions'
))
self
.
show_picked_versions
=
bool_option
(
options
,
'show-picked-versions'
)
zc
.
buildout
.
easy_install
.
show_picked_versions
(
bool_option
(
options
,
'show-picked-versions'
)
)
self
.
show_picked_versions
)
download_cache
=
options
.
get
(
'download-cache'
)
if
download_cache
:
...
...
@@ -648,7 +650,7 @@ class Buildout(DictMixin):
elif
(
not
installed_parts
)
and
installed_exists
:
os
.
remove
(
self
[
'buildout'
][
'installed'
])
zc
.
buildout
.
easy_install
.
print_picked_versions
()
self
.
_
print_picked_versions
()
self
.
_unload_extensions
()
def
_update_installed
(
self
,
**
buildout_options
):
...
...
@@ -995,6 +997,44 @@ class Buildout(DictMixin):
'zc.buildout.unloadextension'
):
ep
.
load
()(
self
)
def
_print_picked_versions
(
self
):
Installer
=
zc
.
buildout
.
easy_install
.
Installer
if
not
self
.
show_picked_versions
:
return
if
not
Installer
.
_picked_versions
:
# Don't print empty output.
return
output
=
[
'[versions]'
]
required_output
=
[]
for
dist_
,
version
in
sorted
(
Installer
.
_picked_versions
.
items
()):
if
dist_
in
Installer
.
_required_by
:
required_output
.
append
(
''
)
required_output
.
append
(
'# Required by:'
)
for
req_
in
sorted
(
Installer
.
_required_by
[
dist_
]):
required_output
.
append
(
'# '
+
req_
)
target
=
required_output
else
:
target
=
output
target
.
append
(
"%s = %s"
%
(
dist_
,
version
))
output
.
extend
(
required_output
)
print_
(
"Versions had to be automatically picked."
)
print_
(
"The following part definition lists the versions picked:"
)
print_
(
'
\
n
'
.
join
(
output
))
# REINOUT Print to file
# if file_name:
# if os.path.exists(file_name):
# output[:1] = [
# '',
# '# Added by Buildout Versions at %s' % datetime.now(),
# ]
# output.append('')
# f = open(file_name,'a')
# f.write('\n'.join(output))
# f.close()
# print("This information has been written to %r" % file_name)
def
setup
(
self
,
args
):
if
not
args
:
raise
zc
.
buildout
.
UserError
(
...
...
src/zc/buildout/easy_install.py
View file @
19165bc0
...
...
@@ -739,42 +739,6 @@ def show_picked_versions(setting=None):
Installer
.
_show_picked_versions
=
bool
(
setting
)
return
old
def
print_picked_versions
():
if
not
Installer
.
_show_picked_versions
:
return
if
not
Installer
.
_picked_versions
:
# Don't print empty output.
return
output
=
[
'[versions]'
]
required_output
=
[]
for
dist_
,
version
in
sorted
(
Installer
.
_picked_versions
.
items
()):
if
dist_
in
Installer
.
_required_by
:
required_output
.
append
(
''
)
required_output
.
append
(
'# Required by:'
)
for
req_
in
sorted
(
Installer
.
_required_by
[
dist_
]):
required_output
.
append
(
'# '
+
req_
)
target
=
required_output
else
:
target
=
output
target
.
append
(
"%s = %s"
%
(
dist_
,
version
))
output
.
extend
(
required_output
)
print
(
"Versions had to be automatically picked."
)
print
(
"The following part definition lists the versions picked:"
)
print
(
'
\
n
'
.
join
(
output
))
# if file_name:
# if os.path.exists(file_name):
# output[:1] = [
# '',
# '# Added by Buildout Versions at %s' % datetime.now(),
# ]
# output.append('')
# f = open(file_name,'a')
# f.write('\n'.join(output))
# f.close()
# print("This information has been written to %r" % file_name)
def
install
(
specs
,
dest
,
links
=
(),
index
=
None
,
...
...
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