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
Nicolas Wavrant
slapos.buildout
Commits
7e773f1d
Commit
7e773f1d
authored
Feb 01, 2017
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIXUP
parent
8053d0af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
10 deletions
+33
-10
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+33
-10
No files found.
src/zc/buildout/buildout.py
View file @
7e773f1d
...
...
@@ -535,6 +535,22 @@ class Buildout(DictMixin):
self
.
_setup_directories
()
options
=
self
[
'buildout'
]
link
=
options
.
get
(
'link'
,
""
)
shared_path
=
shared_stack_path
(
link
)
if
link
and
shared_path
:
shared_item_set
=
set
(
os
.
listdir
(
shared_path
))
current_item_set
=
set
(
os
.
listdir
(
'.'
))
for
name
in
(
'bin'
,
'parts'
,
'eggs'
,
'develop-eggs'
):
for
item
in
os
.
listdir
(
os
.
path
.
join
(
shared_path
,
name
)):
new_item_path
=
os
.
path
.
join
(
name
,
item
)
if
not
os
.
path
.
exists
(
new_item_path
)
and
item
!=
'buildout'
:
os
.
symlink
(
os
.
path
.
join
(
shared_path
,
name
,
item
),
new_item_path
)
for
item
in
shared_item_set
-
current_item_set
:
os
.
symlink
(
os
.
path
.
join
(
shared_path
,
item
),
item
)
elif
link
:
options
[
'extends'
]
=
link
# Now copy buildout and setuptools eggs, and record destination eggs:
entries
=
[]
options
=
self
[
'buildout'
]
...
...
@@ -633,6 +649,12 @@ class Buildout(DictMixin):
self
.
install
(())
def
install
(
self
,
install_args
):
options
=
self
[
'buildout'
]
link
=
options
.
get
(
'link'
,
""
)
if
link
and
shared_path
:
self
.
_save_installed_options
()
return
try
:
self
.
_install_parts
(
install_args
)
finally
:
...
...
@@ -1799,16 +1821,17 @@ def _open(base, filename, seen, dl_options, override, downloaded):
os
.
remove
(
downloaded_filename
)
options
=
result
.
get
(
'buildout'
,
{})
link
=
options
.
pop
(
'link'
,
""
)
shared_path
=
shared_stack_path
(
link
)
if
link
and
shared_path
:
shared_item_set
=
set
(
os
.
listdir
(
shared_path
))
current_item_set
=
set
(
os
.
listdir
(
'.'
))
for
item
in
shared_item_set
-
current_item_set
:
os
.
symlink
(
os
.
path
.
join
(
shared_path
,
item
),
item
)
Buildout
.
install
=
lambda
*
args
:
None
elif
link
:
options
[
'extends'
]
=
link
# link = options.get('link', "")
# shared_path = shared_stack_path(link)
# if link and shared_path:
# shared_item_set = set(os.listdir(shared_path))
# current_item_set = set(os.listdir('.'))
# for item in shared_item_set - current_item_set:
# if item not in ('bin', 'develop-eggs', 'eggs',):
# os.symlink(os.path.join(shared_path, item), item)
# Buildout.install = lambda *args : None
# elif link:
# options['extends'] = link
extends
=
options
.
pop
(
'extends'
,
None
)
if
'extended-by'
in
options
:
...
...
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