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
Rafael Monnerat
slapos.buildout
Commits
cb9f7457
Commit
cb9f7457
authored
Jul 18, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an option to change the default policy for unzipping zip-safe
eggs.
parent
8066cd28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
1 deletion
+65
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+9
-0
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+1
-1
src/zc/buildout/unzip.txt
src/zc/buildout/unzip.txt
+55
-0
No files found.
src/zc/buildout/buildout.py
View file @
cb9f7457
...
...
@@ -240,6 +240,15 @@ class Buildout(UserDict.DictMixin):
if
install_from_cache
==
'true'
:
zc
.
buildout
.
easy_install
.
install_from_cache
(
True
)
always_unzip
=
options
.
get
(
'unzip'
)
if
always_unzip
:
if
always_unzip
not
in
(
'true'
,
'false'
):
self
.
_error
(
'Invalid value for unzip option: %s'
,
always_unzip
)
if
always_unzip
==
'true'
:
zc
.
buildout
.
easy_install
.
always_unzip
(
True
)
# "Use" each of the defaults so they aren't reported as unused options.
for
name
in
_buildout_default_options
:
options
[
name
]
...
...
src/zc/buildout/tests.py
View file @
cb9f7457
...
...
@@ -2657,7 +2657,7 @@ def test_suite():
doctest.DocFileSuite(
'
easy_install
.
txt
', '
downloadcache
.
txt
', '
dependencylinks
.
txt
',
'
allowhosts
.
txt
',
'
allowhosts
.
txt
',
'
unzip
.
txt
',
setUp=easy_install_SetUp,
tearDown=zc.buildout.testing.buildoutTearDown,
...
...
src/zc/buildout/unzip.txt
0 → 100644
View file @
cb9f7457
Always unzipping eggs
=====================
By default, zc.buildout doesn't unzip zip-safe eggs.
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = eggs
... find-links = %(link_server)s
...
... [eggs]
... recipe = zc.recipe.egg
... eggs = demo
... ''' % globals())
>>> _ = system(buildout)
>>> ls('eggs')
- demo-0.4c1-py2.4.egg
- demoneeded-1.2c1-py2.4.egg
d setuptools-0.6c8-py2.4.egg
- zc.buildout.egg-link
This follows the
policy followed by setuptools itself. Experience shows this policy
to to be inconvenient. Zipped eggs make debugging more difficult and
often import more slowly.
You can include an unzip option in the buildout section to change the
default unzipping policy.
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = eggs
... find-links = %(link_server)s
... unzip = true
...
... [eggs]
... recipe = zc.recipe.egg
... eggs = demo
... ''' % globals())
>>> import os
>>> for name in os.listdir('eggs'):
... if name.startswith('demo'):
... remove('eggs', name)
>>> _ = system(buildout)
>>> ls('eggs')
d demo-0.4c1-py2.4.egg
d demoneeded-1.2c1-py2.4.egg
d setuptools-0.6c8-py2.4.egg
- zc.buildout.egg-link
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