Skip to main content

ZC Buildout recipe to fake zope 2 packages as eggs.

Project description

Zope 2 isn’t eggified yet, Zope 3 does. That can become a problem if you want to install some egg with depedencies related to Zope 3 eggs (such as zope.interface, zope.component, …)

This buildout recipe will simply add some fake egg link to zope libraries (installed inside zope/lib/python/zope/…) so that setuptools can see that the dependencies are already satisfied and it won’t fetch them anymore.

Detailed Documentation

Here is the most basic example:

>>> write('buildout.cfg',
... """
... [buildout]
... parts =
...     zope2
...     fakezope2eggs
...
... find-links =
...     http://dist.plone.org/
...
... [zope2]
... recipe = plone.recipe.zope2install
... url = http://www.zope.org/Products/Zope/2.9.7/Zope-2.9.7-final.tgz
...
... [fakezope2eggs]
... recipe = z3c.recipe.fakezope2eggs
... """)

Now if we run the buildout:

>>> print system(buildout)
Installing zope2.
running build_ext
creating zope.proxy
copying zope/proxy/proxy.h -> zope.proxy
building 'AccessControl.cAccessControl' extension
creating build
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/AccessControl
...

Now if we list all the developped egg we have:

>>> ls(sample_buildout, 'develop-eggs')
-  plone.recipe.zope2install.egg-link
-  z3c.recipe.fakezope2eggs.egg-link
-  zope.app.adapter.egg-info
-  zope.app.annotation.egg-info
-  zope.app.apidoc.egg-info
-  zope.app.applicationcontrol.egg-info
-  zope.app.appsetup.egg-info
-  zope.app.authentication.egg-info
-  zope.app.basicskin.egg-info
-  zope.app.broken.egg-info
-  zope.app.cache.egg-info
...

Let’s have a look at the content of one of them:

>>> cat(sample_buildout, 'develop-eggs', 'zope.app.adapter.egg-info')
Metadata-Version: 1.0
Name: zope.app.adapter
Version: 0.0

You might also want to add other fake eggs to your buildout, to do so use the additional-fake-eggs option, for example:

>>> write('buildout.cfg',
... """
... [buildout]
... parts =
...     zope2
...     fakezope2eggs
...
... find-links =
...     http://dist.plone.org/
...
... [zope2]
... recipe = plone.recipe.zope2install
... url = http://www.zope.org/Products/Zope/2.9.7/Zope-2.9.7-final.tgz
...
... [fakezope2eggs]
... recipe = z3c.recipe.fakezope2eggs
... additional-fake-eggs = ZODB3
... """)

>>> print system(buildout)
Uninstalling fakezope2eggs.
Updating zope2.
Installing fakezope2eggs.
<BLANKLINE>

Let’s check if the additionnal fake egg exists:

>>> cat(sample_buildout, 'develop-eggs', 'ZODB3.egg-info')
Metadata-Version: 1.0
Name: ZODB3
Version: 0.0

CHANGES

Version 0.5 (2008-07-21)

  • rename affinitic.recipe.fakezope2eggs to z3c.recipe.fakezope2eggs and moving it to zope.org repos

  • Feature: Apply patch from Daniel Nouri which add an optional parameter to skip fake eggs creation

Version 0.4 (2008-03-25)

  • Feature: Apply patch from Bertrand Mathieu which add an optional parameter to be able to define another zope2 part name (might not be always “zope2” in every buildout)

Version 0.3 (2008-02-19)

  • Feature: Add additional-fake-eggs option which allow you to define other fake eggs which are not in zope.* or in zope.app.*

Version 0.2 (2008-01-28)

  • Bug: Fix zope.app.* bug

Version 0.1 (2007-12-10)

  • Initial Release

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z3c.recipe.fakezope2eggs-0.5.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file z3c.recipe.fakezope2eggs-0.5.tar.gz.

File metadata

File hashes

Hashes for z3c.recipe.fakezope2eggs-0.5.tar.gz
Algorithm Hash digest
SHA256 705ecb69a0207b8a6352bd668367433af7d8d7a7f2d6d90e41210b1f3e498032
MD5 df2d75a359f41e3b6271bf25906748c0
BLAKE2b-256 68cef418da429ae08934ef4f352faccd448aa7e18c0d72e3539e5b3e711e2d64

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page