eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/unzip.txt
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 Always unzipping eggs
       
     2 =====================
       
     3 
       
     4 By default, zc.buildout doesn't unzip zip-safe eggs.
       
     5 
       
     6     >>> write('buildout.cfg',
       
     7     ... '''
       
     8     ... [buildout]
       
     9     ... parts = eggs
       
    10     ... find-links = %(link_server)s
       
    11     ...
       
    12     ... [eggs]
       
    13     ... recipe = zc.recipe.egg
       
    14     ... eggs = demo
       
    15     ... ''' % globals())
       
    16 
       
    17     >>> _ = system(buildout)
       
    18     >>> ls('eggs')
       
    19     -  demo-0.4c1-py2.4.egg
       
    20     -  demoneeded-1.2c1-py2.4.egg
       
    21     d  setuptools-0.6c8-py2.4.egg
       
    22     -  zc.buildout.egg-link
       
    23 
       
    24 This follows the policy followed by setuptools itself.  Experience shows
       
    25 this policy to to be inconvenient.  Zipped eggs make debugging more
       
    26 difficult and often import more slowly.
       
    27 
       
    28 You can include an unzip option in the buildout section to change the
       
    29 default unzipping policy.
       
    30 
       
    31     >>> write('buildout.cfg',
       
    32     ... '''
       
    33     ... [buildout]
       
    34     ... parts = eggs
       
    35     ... find-links = %(link_server)s
       
    36     ... unzip = true
       
    37     ...
       
    38     ... [eggs]
       
    39     ... recipe = zc.recipe.egg
       
    40     ... eggs = demo
       
    41     ... ''' % globals())
       
    42 
       
    43 
       
    44     >>> import os
       
    45     >>> for name in os.listdir('eggs'):
       
    46     ...     if name.startswith('demo'):
       
    47     ...         remove('eggs', name)
       
    48 
       
    49     >>> _ = system(buildout)
       
    50     >>> ls('eggs')
       
    51     d  demo-0.4c1-py2.4.egg
       
    52     d  demoneeded-1.2c1-py2.4.egg
       
    53     d  setuptools-0.6c8-py2.4.egg
       
    54     -  zc.buildout.egg-link