Entries For: December 20072007-12-10Zope 3 dependencies in Zope 2 buildoutDescribe a buildout recipe to avoid fetching zope 3 libraries when installing eggs with zope 3 depedencies in a zope 2 buildout I got tired removing zope.interface, zope.component, zope.deferredimport, zope.event, ... of my eggs folder inside my buildout when installing package such as z3c.sqlalchemy in my Zope2 / Plone buildouts ... So if you list your zope library :
You will get
Where each of these file will be seen for setuptools as an egg: $ cat yourbuildout/develop-eggs/zope.app.component.egg-info Sure this might look like an ugly hook but I can't wait for zope 2 eggification 2007-12-06Buildout and VirtualenvHow and why use buildout with virtualenv Buildout is this wonderful tool which helps you to automate setup and configuration of your applications. Virtualenv is a tool which will help you to isolate your python environment A few days ago I got stuck during a long time because I didn't see that one library I installed in my global site-packages of my favourite python 2.4 (on my ubuntu: /usr/lib/python2.4/site-packages/) was a lower version of a library I was using in my buildout. Package was sqlalchemy 0.4 in my global sites-package and my buildout based application was using sqlalchemy 0.3.8 ... Here is a simple solution to avoid this kind of things.Idea is to start buildout with a python free of any external library. Virtualenv is the answer. Install VirtualenvEasy:$ easy_install virtualenv you will have then a file that you can run: /usr/bin/virtualenv Let's say you have a buildout configuration go into it: $ cd myApp.buildoutNow you just have to create the python environment without any access to the global site-packages with virtualenv: $ virtualenv --no-site-packages .You will have then your new python in the bin folder : $ ls -l binYou can now run the buildout configuration with your new python: $ ./bin/python2.4 bootstrap.pyThis will create you a nice and totally isolated environment ... |