I just read on a tweet that the first alpha release of Plone 4 is already available for testing and I wasn’t able to resist the temptation. :P As some people have already pointed out, Python 2.6 for Debian is only available from the experimental repository, and most of us prefer to stay testing or unstable at most. :)
Thanks god, there’s a buildout recipe (we should create a Linux distro based on buildout someday, alecm ;) to build Python from source in an isolated environment. Steps:
- svn co https://svn.plone.org/svn/collective/buildout/python/ buildout.python
- cd buildout.python; python bootstrap.py
- Edit buildout.cfg to fit your needs. You might want to comment out the references to the Python versions you don’t want to install.
- bin/buildout
- cd to-another-directory; paster create -t plone3_buildout plone4.
- Enter “4.0a1″ (without quotes) when asked about “Which Plone version to install”. Make sure you have the last version of ZopeSkel (2.14.1 while I’m writing this – easy_install -U ZopeSkel) or the generated buildout.cfg won’t be valid for Plone 4 otherwise. Thanks to MatthewWilkes for the pointer and of course for the ZopeSkel release. :)
- path-to-buildout.python/python-2.6/bin/python bootstrap.py
- bin/buildout. If you get tons of lines in your console output about fetching distribute, see this post by Reinout van Rees.
- You’ll need to install PIL to run Plone, so do either:
- python-2.6/bin/easy_install-2.6 http://dist.repoze.org/PIL-1.1.6.tar.gz, or
- Add PIL or PILwoTk to any of the eggs sections of your Plone 4 buildout and re-run bin/buildout.
If you stumble upon an error message similar to:
Downloading http://dist.repoze.org/PIL-1.1.6.tar.gz Processing PIL-1.1.6.tar.gz Running PIL-1.1.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Fev48C/PIL-1.1.6/egg-dist-tmp-SNtCRu In file included from decode.c:608: libImaging/Zip.h:11:18: error: zlib.h: No such file or directory In file included from decode.c:608: libImaging/Zip.h:37: error: expected specifier-qualifier-list before ‘z_stream’ error: Setup script exited with error: command 'gcc' failed with exit status 1
try “aptitude install zlib1g-dev”. Thanks davisagli!
The previous procedure should work… But it didn’t in my system. :( I get an error in the buildout.python bin/buildout:
SystemError: ('Failed', 'patch -p0 < /somepath/buildout.python/parts/readline-patch/readline.patch')
I’ve already tweeted fschulze (who is presumably the author of the collective.buildout.python stuff, according to comments in the #plone IRC channel) about this issue. I hope it will get solved soon! :)
In the meanwhile, removing or commenting out the stuff about readline.patch in the collective.buildout.python buildout.cfg before running bin/buildout appears to be a valid workaround, at least for me.
Related articles
-
You don’t need to modify the buildout config, just use ZopeSkel as I suggested:
nimbus:~ matthewwilkes$ paster create -t plone3_buildout
Selected and implied templates:
ZopeSkel#plone3_buildout A buildout for Plone 3 projectsEnter project name: plone4
Variables:
egg: plone4
package: plone4
project: plone4
Enter plone_version (Which Plone version to install) ['3.2.2']: 4.0a1I know it looks weird, but as there’s so much work going on with ZopeSkel at the moment I didn’t want to introduce a new template just to (potentially) remove it again in a few weeks.
Putting 4.0a1 as the version number to either plone2.5_buildout or plone3_buildout will create a working Plone 4 buildout.
N.B.: Make sure you have the latest ZopeSkel release. If the plone3_buildout doesn’t default to 3.2.2 it’s not the latest, do easy_install -U ZopeSkel to fix that.
-
Sorry, the default version should be 3.3.2, not 3.2.2 – I hadn’t updated my ZopeSkel! :D
-
hi,
i commited a fix for readline support on linux now. patching works now.


4 comments
Comments feed for this article
Trackback link: http://dukebody.com/2009/11/installing-plone-40a1-on-debian/trackback/