Commit db715ef3 authored by Jim Fulton's avatar Jim Fulton

Bugs Fixed

----------

- https://bugs.launchpad.net/products/zc.buildout/+bug/71246

Buildout extensions installed as eggs couldn't be loaded in offline
  mode.
parent fab9bf66
......@@ -28,6 +28,15 @@ Feature Changes
- Configuration files can now be loaded from URLs.
Bugs Fixed
----------
- https://bugs.launchpad.net/products/zc.buildout/+bug/71246
Buildout extensions installed as eggs couldn't be loaded in offline
mode.
1.0.0b16 (2006-12-07)
=====================
......
......@@ -562,8 +562,10 @@ class Buildout(UserDict.DictMixin):
def _load_extensions(self):
specs = self['buildout'].get('extensions', '').split()
if specs:
path = [self['buildout']['develop-eggs-directory']]
if self['buildout'].get('offline') == 'true':
dest = None
path.append(self['buildout']['eggs-directory'])
else:
dest = self['buildout']['eggs-directory']
if not os.path.exists(dest):
......@@ -571,8 +573,7 @@ class Buildout(UserDict.DictMixin):
os.mkdir(dest)
zc.buildout.easy_install.install(
specs, dest,
path=[self['buildout']['develop-eggs-directory']],
specs, dest, path=path,
working_set=pkg_resources.working_set,
)
for ep in pkg_resources.iter_entry_points('zc.buildout.extension'):
......
......@@ -826,6 +826,44 @@ Uninstall recipes need to be called when a part is removed too:
"""
def extensions_installed_as_eggs_work_in_offline_mode():
'''
>>> mkdir('demo')
>>> write('demo', 'demo.py',
... """
... def ext(buildout):
... print 'ext', list(buildout)
... """)
>>> write('demo', 'setup.py',
... """
... from setuptools import setup
...
... setup(
... name = "demo",
... py_modules=['demo'],
... entry_points = {'zc.buildout.extension': ['ext = demo:ext']},
... )
... """)
>>> bdist_egg(join(sample_buildout, "demo"), sys.executable,
... join(sample_buildout, "eggs"))
>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... extensions = demo
... parts =
... offline = true
... """)
>>> print system(join(sample_buildout, 'bin', 'buildout')),
ext ['buildout']
'''
######################################################################
def create_sample_eggs(test, executable=sys.executable):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment