Personal tools
You are here: Home Weblog Archive 2007 September

Entries For: September 2007

2007-09-09

The problem with buildout and PyDev

Filed Under:

Lately it has been possible to develop and simply deploy a Zope 3 based application by organizing code in a single Python package that uses zope3 packages as dependency,  plus a buildout recipe that creates a running zope 3 instance based on these eggs. For anyone using Eclipse + PyDev, this approach has the following inconvenience: the `eggs` folder can't be properly imported as external source folder for the project. Eclipse knows about eggs, but only when they're in marked in a .pth file, inside the site-packages folder. Creating a .pth file in the eggs folder and reimporting the folder won't do any good, PyDev continues to ignore the eggs.

Solution? Let me introduce pb.recipes.pydev, which generates a .pydevproject file, based on the dependencies of a bunch of specified eggs (for example, the zope3-dependent application that you're developing). Closing and reopening the project in Eclipse, after generating that file, will reindex the packages and will enable sweet auto-completion, auto-import and "go to source", provided you have the PyDev Extensions.

The recipe has a couple of problems at the moment:

  • it triggers recomputing the egg dependencies, which is already done once by the buildout process,
  • it overwrites the .pydevproject file with a possibly simplified version
  • Eclipse doesn't import zipped egg files, so you'll have to keep the the eggs unpacked.
Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: