Personal tools
You are here: Home Reinout van Rees' weblog Automatic zope.component dependency handling (update: not really)

Automatic zope.component dependency handling (update: not really)

by Reinout van Rees — last modified Oct 08, 2007 05:57 PM
Filed Under:

How to include zope.component and zope.interface in your setup.py

Thanks to philikon, who pointed me to the zope3 distribution page, I've managed to get the zope3 component architecture stuff included in my setup.py. Included meaning that the zope3 stuff gets downloaded when you try to install the product (archgenxml 1.6 in this case) with python setup.py install.

Setuptools tells you how to declare dependencies. In the end I had to include the following in the setup.py:

...
install_requires="""
zope.interface
zope.component
zope.testing
""",
dependency_links = [
  'http://download.zope.org/distribution/'
  ],
...

Update: not really, it turns out. It works like a charm, until you start a zope 2.9.4 instance. There is some mismatch in the versions of the zope components between 2.9.4 and what distutils downloads. And distutils' packages are placed inside python itself and that wins from the packages bundles with zope 2.9.4...

I guess the problem is in zope.interface. The rest of the packages are 3.2, zope.interface has a 3.3 egg. There's a 3.2 .tgz, but if you set the dependency to the 3.2 version, setuptools complains about an absolute path in the egg it tries to make out of that .tgz.

Document Actions