Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Support

Detailed Documentation

Usage

Sometimes you can’t add eggs through your buildout engine or easy_install, for example if some dev libraries are lacking on your system, or are too old, etc.

But you can install module directly on your system using your system’s packaging utility (port install python-xxx, apt-get install python-xxx or with .msi installers for Windows. In example python-ldap or lxml are somehow difficult to install on Windows using source eggs, and are usually available as binary installers.

Then, though you get all you need in your python environment, your buildout may fail because an egg is missing.

This recipe will make buildout believe that such missing eggs are available and installed, when your app will use the system wide Pyhton packages you installed by your way.

Yes, I know you should usually not do this but sometimes there’s no other (easy) way to have your buildout completed.

How-to

You have to add ON TOP OF YOUR PARTS a collective.recipe.mockedeggs recipe part:

[buildout]
parts = mocked-eggs
        other parts...

[mocked-eggs]
recipe=collective.recipe.mockedeggs

The recipe supports the following options:

mocked-eggs

The list of eggs you want to mock, with their version number, as for example:

mocked-eggs =
    python-ldap=2.3.10
    Markdown = 1.7

Example usage

We’ll start by creating a buildout that uses the recipe:

>>> write('buildout.cfg',
... """
... [buildout]
... parts = mocked-eggs-test
...         zopepy
...
... eggs = mocked1
...        mocked2
...
... [mocked-eggs-test]
... recipe = collective.recipe.mockedeggs
... mocked-eggs =
...      mocked1=1.0
...      mocked2=  2.0
...
... [zopepy]
... recipe = zc.recipe.egg
... interpreter = zopepy
... eggs = mocked1
...        mocked2
...
... """)

Running the buildout gives us

>>> print 'start...\n', system(buildout)
start...
Installing mocked-eggs-test.
mocked-eggs-test: Mocked eggs mocked1, mocked2.
...

>>> import os
>>> os.path.exists('mocked-eggs-test')
True
>>> os.path.exists('mocked-eggs-test/fake-mocked1')
True
>>> os.path.exists('mocked-eggs-test/fake-mocked2')
True

>>> setup1 = open('mocked-eggs-test/fake-mocked1/setup.py').read()
>>> '1.0' in setup1
True
>>> "'mocked1'" in setup1
True
>>> binary = open('bin/zopepy', 'r').read()
>>> 'mocked-eggs-test/fake-mocked1' in binary
True

Contributors

  • “Thomas Desvenain”, Author

  • “Gilles Lenfant”, Contributor

Change history

1.0rc1 23/03/2010

  • we can have spaces in mocked eggs declaration (myegg = 2.0 is allowed)

  • better documentation [glenfant,tdesvenain]

1.0a1 10/03/2010

  • Initial release [tdesvenain]

  • Created recipe with ZopeSkel

Download

Metadata

Release files for collective.recipe.mockedeggs 1.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.recipe.mockedeggs 1.0rc1
File Size Uploaded Provenance Actions
collective.recipe.mockedeggs-1.0rc1.tar.gz 5.9 kB Without provenance Details for collective.recipe.mockedeggs-1.0rc1.tar.gz

Release files / collective.recipe.mockedeggs-1.0rc1.tar.gz

Download URL collective.recipe.mockedeggs-1.0rc1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c03c85408059a69bf712e0fbfd6d151a8aef4960fdfbe9dcc021b1ac85877ef0
BLAKE2b-256 checksum
How to use checksums
a447470f72c66bddcb68e02413f1c79bea5faf7770bc1504b7c389d8f439bc4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for collective.recipe.mockedeggs 1.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page