<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Indent four &#187; python</title>
	<atom:link href="http://www.indentfour.com/blog/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indentfour.com/blog</link>
	<description>Eight steps forward - four steps back</description>
	<lastBuildDate>Wed, 04 Aug 2010 13:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building Plone 4.0 core-dev on OS X Leopard 10.5</title>
		<link>http://www.indentfour.com/blog/2009/10/building-plone-4-0-core-dev-on-os-x-leopard-10-5/</link>
		<comments>http://www.indentfour.com/blog/2009/10/building-plone-4-0-core-dev-on-os-x-leopard-10-5/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:38:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Plone]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.indentfour.com/blog/?p=125</guid>
		<description><![CDATA[update 1: there is python26 in MacPorts.
After the great Plone Conference 2009 that was held from wednesday to friday we are now sprinting two more days. I guess there&#8217;s more than 200 people sprinting on saturday and sunday, improving Plone in all area&#8217;s: documentation, code, add-ons, you name it.
I gave up on getting plone 4.0 [...]]]></description>
			<content:encoded><![CDATA[<p><em>update 1</em>: there is python26 in MacPorts.</p>
<p>After the great Plone Conference 2009 that was held from wednesday to friday we are now sprinting two more days. I guess there&#8217;s more than 200 people sprinting on saturday and sunday, improving Plone in all area&#8217;s: documentation, code, add-ons, you name it.</p>
<p>I gave up on getting plone 4.0 coredev running on my mac a few months ago after five minutes when something started to complain, but with all the gread minds around me in Budapest and a slide show by Maurits I wanted to get it running now. But it&#8217;s still painfull for some reason and I have I have no clue why it works for everybody else but not for me. Anyway, here are the roadblocks I bumped into installing it on OS X Leopard <strong>10.5</strong> .</p>
<h3>Python 2.6</h3>
<p>You need python 2.6 to run Plone 4.  OS X leopard comes default with an older python 10.5. For doing my Plone 3.X projects I use the python2.4 from macports, which works great, but macports for Leopard doesn&#8217;t have a python 2.6 package. Snow Leopard raised the bar by including support for both 32bit and 64bit in python, and causing a lot of pain to build other python versions from source, because they might link to the wrong 32bit or 64bit support libraries.</p>
<p>Florian Schulze created a buildout builds python 2.4/2.5 and 2.6 for you, paying attention to all the dependencies. It&#8217;s major goal was to simplify install on Snow Leopard but it works on Leopard 10.5 as well. Or: it should, because it doesn&#8217;t for me, it stops when trying to compile python 2.4. Solution: remove all references to python 2.4 and 2.5 from the buildout.cfg : you only need python 2.6 for Plone 4 and the other versions are already there from macports or the system python.  Hurdle one taken, I have a python 2.6.</p>
<h3>Distribute madness</h3>
<p>After fetching the Plone 4 development branch from <span style="text-decoration: underline;"><em>http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0</em></span> ,  doing a <em><span style="text-decoration: underline;">python2.6 bootstrap.py</span></em> and running <span style="text-decoration: underline;">bin/buildout</span>, the buildout coun&#8217;t install mr.developer.</p>
<address># ImportError: &lt;module &#8217;setuptools.dist&#8217; from &#8216;/Users/fred/buildouts/pythons/python-2.6/lib/python2.6/site-packages/distribute-0.6.3-py2.6.egg/setuptools/dist.pyc&#8217;&gt; has no &#8216;check_packages&#8217; attribute<br />
# An error occured when trying to install mr.developer 1.1.Look above this message for any errors thatwere output by easy_install.</address>
<p>Now what. For some reason the included Distribute version was still stuck at 0.6.3, when 0.6.6. is the most recent version. So I created a python  2.6 virtualenv from my pythons 2.6 buildout (virtualenv-2.6 is created in the bin folder there) and installed  0.6.6 by using the easy_install from the newly created virtualenv. By the way, distribute is the succesor to the setuptools package.</p>
<p>After having a virutalenv with up to date distribute I used it to bootstrap my Plone 4 coredev buildout again and run bin/buildout. jay!</p>
<h3>mr.developer is drunk</h3>
<p>Buildout finished with a report that mr.developer couldn&#8217;t find some sources. You can list them by running bin/develop status, they have exclamation marks before them.  In particular, Products.CMFQuickInstaller and Products.PlacelessTranslationService were not installed by mr.developer in the src/ subfolder. I checked paths, checked with other sprinters, did an svn update, reran bin/buildout, nothing.  In the end I just did a manual svn checkout of the two packages with the links provided in the sources.cfg from the Plone4 core-dev in the src folder.</p>
<h3>Swallow the blue PILl</h3>
<p>bin/instance fg to start Plone 4 and&#8230;&#8230; we have no PIL module. Ah, right, I created a virtualenv without site-packages for the python2.6 to install Distribute. Been there, done that. There&#8217;s an easy way to add the Python Imaging (alias PIL) to your virtualenv by running <span style="text-decoration: underline;">easy_install http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz . </span></p>
<p>And we&#8217;re up and running with a Plone 4 test buildout on OS X Leopard 10.5 . Finally.</p>
<h3>Update 1</h3>
<p>Apparently I had a serious headache or my macports was messed up when I search for Python 2.6 in macports two weeks ago. Alec Mitchell points out it has been there for a long time, just search for with <span style="text-decoration: underline;">port search  python26</span>. After installing python 2.6 with sudo port install python26 and not forgetting to install py26-pil as well, all of the above mentionned problems with distribute and mr.developer are gone. Pfew.</p>
<p><img class="aligncenter size-full wp-image-135" title="plone4" src="http://www.indentfour.com/blog/wp-content/uploads/2009/10/plone4.png" alt="plone4" width="446" height="287" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.indentfour.com/blog/2009/10/building-plone-4-0-core-dev-on-os-x-leopard-10-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
