setuptools and plone buildout
October 2021
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (10 items)
Networking (1 items)
DNS (0 items)

Syndicate this site (XML)

RSS/RDF 0.91

29 agosto

setuptools and plone buildout

you need the right version these days...

I've found the same problem 2 times this week, so I think it's worth to write a note about it.

If you are used to work with plone, you probably already know about buildout (or zc.buildout). It is the preferred way for plone-based website development. I'll not go inside buildout itself (just take a look at Martin Aspeli's great book, Professional Plone Development to learn more about it) but I think this could be a useful reminder for those of you who are using it.

In order to use buildout, you need to have some deps installed on your system, one of those is setuptools. As you will need to use python 2.4 with plone (no 2.5 support yet), you will need to install the 2.4 egg for setuptools. Following the installation instructions you will have to download this and install it like:

sudo sh setuptools-0.6c8-py2.4.egg

After that you can install the rest of the buildout deps (like ZopeSkel) using easy_install-2.4. If you do that, you will find a problem when running ./bin/buildout, something similar to:

Develop: '/mnt/data/xxxxxx/'
unrecognized .svn/entries format; skipping .
Traceback (most recent call last):
  File "/tmp/tmpCvdzgq", line 11, in ?
  File "/mnt/data/xxxxxx/", line 30, in ?
  File "/usr/local/lib/python2.4/distutils/", line 149, in setup
  File "/usr/local/lib/python2.4/distutils/", line 946, in run_commands
  File "/usr/local/lib/python2.4/distutils/", line 966, in run_command
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 27, in run
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 85, in install_for_development
  File "/usr/local/lib/python2.4/distutils/", line 333, in run_command
  File "/usr/local/lib/python2.4/distutils/", line 966, in run_command
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 171, in run
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 252, in find_sources
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 306, in run
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 333, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 45, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 52, in _default_revctrl
    for path in finder(dirname,path):
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 98, in entries_finder
    log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined
  Processing develop directory '/mnt/data/xxxxxx/'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/home/borja/xxxxxx/plone/zzzzzz/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/", line 1477, in main
  File "/usr/home/borja/xxxxxx/plone/zzzzzz/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/", line 324, in install
  File "/usr/home/borja/xxxxxx/plone/zzzzzz/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/", line 556, in _develop
  File "/usr/home/borja/xxxxxx/plone/zzzzzz/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/", line 866, in develop

(notice that the error appears as I've added some modules developed here for my project, like that policy product, src/zzzzzz.policy)

The key there is:

File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg/setuptools/command/", line 98, in entries_finder
  log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined

That error will appear if you are using subversion 1.5 to manage your source code, as the release version of setuptools have some problems with that. To solve that problem, just upgrade setuptools using setuptools (WTF?):

sudo easy_install-2.4 setuptools==dev06

And you are done! (you will have to re-run python and ./bin/buildout again).

Posted by wu at 18:07 | Comments (0) | Trackbacks (0)
<< Zope Security advisory 2008-08-12 | Main | Codigo23 & django t-shirts >>
Re: setuptools and plone buildout

thanks, i had the same problem (and solution) three weeks ago (before going on vacation) and now again, after i came back. of course, i had forgotten the exact solution already, so your timing couldn't have been any better!

however, in my case it was necessary to add the `-U` option, or else setuptools would just ignore the new version, so if anybody has problems with the above solution, try this instead:

sudo easy_install-2.4 -U setuptools==dev06

Posted by: Tom Lazar at agosto 30,2008 11:16
Re: setuptools and plone buildout

Today I've found exactly this very same problem again, and the upgrading trick didn't work...

Just in case someone else has found the same issue, I solved it this time removing the old setuptools package from the site-packages dir of my python installation and reinstalling it (downloading the new .egg from Pypi and reinstalling it manually.

Of course, if you are using your OS package management tool to manage the setuptools package, just upgrade it properly using it. Should work too.

Posted by: Wu at diciembre 03,2008 20:23
Please send trackback to:
There are no trackbacks.
Post a comment