views:

27

answers:

1

I am attempting to write a zc.buildout package that installs some of it's requirements into the parts directory. Any idea how this can be done?

The reason for this is because the zc.buildout application itself is being distributed out, but parts of my package cannot go with it. So instead i would like to install them into the project/parts directory so that locally they can be used, but when the application is distributed they are left behind.

To further clarify, take the following setup.py snipplet:

include_package_data = True,
install_requires = [
    'some_package',
    'some_other_package',
],
entry_points = {

Now if i used that, some_package and some_other_package would be installed into the distributed application section. Then when the app is distributed, those would go with, which should not happen. Note that those two packages are any packages from pypi, i do not have control over their code.

Any ideas?

Currently i am experimenting with downloading the zipped packages myself, and unpacking them into the parts dir. This should work, but obviously it is missing much of the functionality of the packaging system, as i am statically linking to a single version of the package.

Any help would be much appreciated!

+2  A: 

You can use omelette recipe in order to unzip all eggs and put in to one directory in parts directory. Example buildout.cfg

[buildout]
parts = my_omelette
eggs = 
    BeautifulSoup
    django-registration
    other_package_from_pypi

unzip = true

[my_omelette]
recipe = collective.recipe.omelette
eggs = ${buildout:eggs}

This will install and unpack all eggs in to directory parts/my_omelette

Dominik Szopa
My explanation has a few faults in it the more i struggled and learned, but this is by far an awesome solution to the whole problem! Thanks!!
Lee Olayvar