Commit c90b55e8 authored by jim's avatar jim

Bugs Fixed

----------

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

Buildout extensions installed as eggs couldn't be loaded in offline
  mode.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@71503 62d5b8a3-27da-0310-9561-8e5933582275
parent 871c34f2
......@@ -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,17 +562,18 @@ 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):
self._logger.info('Creating directory %s', dest)
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