<?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>mFabrik - mobile sites, apps, HTML5 and CMS software development &#187; buildout</title>
	<atom:link href="http://blog.mfabrik.com/tag/buildout/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Freedom delivered.</description>
	<lastBuildDate>Wed, 03 Aug 2011 09:47:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sauna Sprint day 1: Sunday (technical &amp; motivational)</title>
		<link>http://blog.mfabrik.com/2011/07/25/sauna-sprint-day-1-sunday-technical-motivational/</link>
		<comments>http://blog.mfabrik.com/2011/07/25/sauna-sprint-day-1-sunday-technical-motivational/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 13:31:37 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[eestec]]></category>
		<category><![CDATA[sauna sprint]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[unified installer]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1331</guid>
		<description><![CDATA[Now it has begun: Sauna Sprint 2011 &#8211; an open source event in Finland for Plone &#38; Python hackers and EESTEC students. The first day of Sauna Sprint was spent introducing new EESTEC people to Plone. Almost everyone got Ubuntu installed, there was a short crash course for IRC and then we started installing Plone. [...]]]></description>
			<content:encoded><![CDATA[<p>Now it has begun: Sauna Sprint 2011 &#8211; an open source event in Finland for Plone &amp; Python hackers and EESTEC students.</p>
<p>The first day of Sauna Sprint was spent introducing new EESTEC people to Plone. Almost everyone got Ubuntu installed, there was a short crash course for IRC and then we started installing Plone.</p>
<p>We had a bunch of EESTEC students as a test subject and our goal was to map obstacles in the process of installing Plone for local computer for development. We got some interesting results.</p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-25.jpg"><img class="alignnone size-full wp-image-1335" title="SAMSUNG" src="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-25.jpg" alt="" width="800" height="480" /></a></p>
<p>The data was collected on whiteboard where everyone was free to express any problem he or she had during the installation. The advisors also monitored the user group for possible problems and made notes.</p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-14.29.28.jpg"><img class="alignnone size-full wp-image-1332" title="SAMSUNG" src="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-14.29.28.jpg" alt="" width="800" height="480" /></a></p>
<p style="text-align: center;"><em>Aperture Science test subjects installing Plone in hope they’ll get a cake if they success </em></p>
<p style="text-align: center;"><em><a href="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-14.12.49.jpg"><img class="alignnone size-full wp-image-1333" title="SAMSUNG" src="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-14.12.49.jpg" alt="" width="800" height="480" /></a><br />
</em></p>
<p style="text-align: center;"><em>Good job, but the cake was a lie.</em></p>
<h2>Plone is #%!!”€&amp;! difficult, but we can fix it</h2>
<p>The comments below are collected from the whiteboard.</p>
<p>Don’t make assumptions in the documentation &#8211; people are tabula rasa (i.e. how to use cd command and so on)</p>
<p>Documentation needed to install gcc, PIL dependencies etc. on OS level</p>
<p>No good instructions how to set-up Python with virtualenv (was being fixed in the sprint). Buildout actually does not work with the system Python out of the box: you need to break your OS http://stackoverflow.com/questions/5818100/buildout-tries-to-update-system-wide-distribute-installation-and-refuses-to-run</p>
<p>People try to run buildout by “cd bin ; ./buildout” &#8211; it does not work and the error message is confusing</p>
<p>Unified Installer &#8211; ZEO installation is broken (need clarification what was broken)</p>
<p>Detect Python version in buildout and don&#8217;t try to run on incompatible version</p>
<p>When creating first Plone site input field has label “Path identifier” &#8211; people try to enter Plone FS path there</p>
<p>README.txt in Unified Installer needs updates</p>
<p>ZopeSkel template plone4_buildout should autodetect the latest Plone version (now was 4.0.1)</p>
<p>Update the out of the box Plone installation front page to contain more developer friendly instructions too</p>
<p>plone.org/downloads: Show add-on version compatibility as the first item on the page &#8211; if now compatibility set warn that the compatibility is unknown (same kind of warning if no updates for one year)</p>
<p>Have an easy way to report broken packages</p>
<p>Force a process to improve add-on documentation in p.org, especially regarding installation. Only 1/5 themes was successfully installed by the test personel without guidance, mostly due to lack of instructions and version incompatibilities.</p>
<p>Some <a href="http://piratepad.net/JgN6WR47eJ">work in progress on PiratePad</a> regarding the installation of Plone.</p>
<h2>Evening program</h2>
<p style="text-align: left;">We had Sauna time in Hervanta, student style. EESTEC lived up to their reputation as party animals.</p>
<p style="text-align: left;"><a href="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-22.02.11.jpg"><img class="alignnone size-full wp-image-1334" title="SAMSUNG" src="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-22.02.11.jpg" alt="" width="800" height="480" /></a></p>
<p style="text-align: center;"><em>Delicious pizza was baked, though the audience loudly disagree when the pizza was burnt enough to be eaten<br />
</em></p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-22.15.39.jpg"><img class="size-full wp-image-1337 aligncenter" title="SAMSUNG" src="http://blog.mfabrik.com/wp-content/uploads/2011/07/2011-07-24-22.15.39.jpg" alt="" width="480" height="800" /></a></p>
<p style="text-align: center;"><em>Magic Toni Sause</em></p>
<p>&nbsp;</p>
<p>&nbsp;
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/07/25/sauna-sprint-day-1-sunday-technical-motivational/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plone 4 upgrade: results and steps</title>
		<link>http://blog.mfabrik.com/2011/06/01/plone-4-upgrade-results-and-steps/</link>
		<comments>http://blog.mfabrik.com/2011/06/01/plone-4-upgrade-results-and-steps/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 13:40:09 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[migration]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1277</guid>
		<description><![CDATA[We upgraded one production site to Plone 4. The site is a web front for a retail chain, rich with big images. Plone 4&#8242;s support for blob storage of files has especially helpful. Below are some results. Download speed We see around 33% &#8211; 40% increase Response time Though this is little harder to read, [...]]]></description>
			<content:encoded><![CDATA[<p>We upgraded one production site to Plone 4. The site is a web front for a retail chain, rich with big images. Plone 4&#8242;s support for blob storage of files has especially helpful. Below are some results.</p>
<h2>Download speed</h2>
<p>We see around 33% &#8211; 40% increase</p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/06/Download-speed1.png"><img class="alignnone size-full wp-image-1280" title="Download speed" src="http://blog.mfabrik.com/wp-content/uploads/2011/06/Download-speed1.png" alt="" width="533" height="274" /></a></p>
<h2>Response time</h2>
<p>Though this is little harder to read, due to the sampler having issues, the response time has dropped from 250 ms to near 100 ms.</p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/06/Response-times.png"><img class="alignnone size-full wp-image-1278" title="Response times" src="http://blog.mfabrik.com/wp-content/uploads/2011/06/Response-times.png" alt="" width="783" height="297" /></a></p>
<h2>The update process</h2>
<p>Here is the process what we did.</p>
<p>Create a duplicate of buildout.cfg with Plone 4 based recipes and run bootstrap.py with Python 2.6.</p>
<p>Uninstall a lot of unneeded add-ons which had collected cruft over the years: plone4artists audio, video, LinguePlone.</p>
<p>Uninstall Products.CacheSetup. This is replaced with plone.app.caching in Plone 4.</p>
<p>Use <a href="wildcard.fixpersistentutilities">wildcard.fixpersistentutilities</a> to clean up leftovers of broken add-on uninstallers (Singing &amp; Dancing, p4a).</p>
<p><a href="http://plone.org/documentation/kb/manually-removing-local-persistent-utilities/">Remove broken persistent tools</a> (Notifica, Search &amp; Replace, etc.).</p>
<p>Make sure that <a href="http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/updating-plone-3-themes-for-plone-4">the site custom theme extends Plone 4 Classic Theme</a>.</p>
<p>Replace old collective.slideshow with Products.Carousel. The migration script is available in collective.developermanual.</p>
<p>Replace old collective.fancyzoomview with Products.PipBox. The migration script and PipBox code are available in collective.developermanual.</p>
<p>Copy Data.fs from Plone 3.3 to new Plone 4 buildout.</p>
<p><strong>&#8230; in this point we move from Plone 3 buildout to Plone 4 buildout &#8230;</strong></p>
<p>Run portal_migration.</p>
<p>Converted Language portal_catalog index from LanguageIndex to FieldIndex (instructions available in c.developermanual).</p>
<p>Rebuild the catalog.</p>
<p>Reset theme on portal_skins properties tab. Shuffle portal_skins layers until they work.</p>
<p>Migrate custom Archetypes image scale sizes from monkey-patch to plone.app.imaging and imaging_properties.</p>
<p>Remove kukit-devel in portal_javascripts.</p>
<p>In portal_transforms -&gt; safe_html, disable_transform=1.</p>
<p>Change custom folder listing from atct_album_view32 to atct_album_view.</p>
<h2>Futher info</h2>
<p>Some of these <a href="https://svn.plone.org/svn/collective/collective.developermanual/trunk/source/misc/upgrade.">upgrade tips are collected to collective.developermanual</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/06/01/plone-4-upgrade-results-and-steps/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Session affinity (sticky) with Nginx load balancing</title>
		<link>http://blog.mfabrik.com/2011/03/21/session-affinity-sticky-with-nginx-load-balancing/</link>
		<comments>http://blog.mfabrik.com/2011/03/21/session-affinity-sticky-with-nginx-load-balancing/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 19:47:13 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[front end]]></category>
		<category><![CDATA[load balancer]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[session affinity]]></category>
		<category><![CDATA[sticky sessions]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1140</guid>
		<description><![CDATA[These are instructions for setting up session affinity with Nginx web server and Plone CMS. Nginx can be used as a load balancer at the front of several Plone front-end processes (ZEO processes). By default, Nginx does not do session affinity, a.k.a. sticky sessions.  If you have site functionality which stores user specific data on [...]]]></description>
			<content:encoded><![CDATA[<p>These are instructions for setting up session affinity with Nginx web server and <a href="http://plone.org">Plone</a> CMS. Nginx can be used as a load balancer at the front of several Plone front-end processes (ZEO processes). By default, Nginx does not do session affinity, a.k.a. sticky sessions.  If you have site functionality which stores user specific data on the front end session data, let&#8217;s say an eCommerce site shopping cart, you must always redirect the user to the same ZEO process or they will have have different random shopping cart for each front end client.</p>
<p>Instructions assume you are installing <a href="http://collective-docs.plone.org/hosting/nginx.html#buildout-and-recipe">Nginx via buildout</a>.</p>
<p>Nginx sticky session can be loaded from here</p>
<ul>
<li><a href="http://nginx-sticky-module.googlecode.com/files/nginx-sticky-module-1.0-rc2.tar.gz">Nginx sticky sessions module</a></li>
</ul>
<p>Manually extract nginx-sticky-module under src folder:</p>
<pre>cd src
wget http://nginx-sticky-module.googlecode.com/files/nginx-sticky-module-1.0-rc2.tar.gz</pre>
<p>Then add it do Nginx <em>configure</em> options in buildout part:</p>
<pre>[nginx-build]
recipe = zc.recipe.cmmi
url = http://sysoev.ru/nginx/nginx-0.7.65.tar.gz
extra_options = --add-module=${buildout:directory}/src/nginx-sticky-module-1.0-rc2</pre>
<p>Now test recompling Nginx via buildout:</p>
<pre>mv parts/nginx-build/ parts/nginx-build-old # Make sure full rebuild is done
bin/buildout install nginx-build</pre>
<p>See that it compiles without erros. Here is the line of compiling sticky module:</p>
<pre>gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/mail \
        -o objs/addon/nginx-sticky-module-1.0-rc2/ngx_http_sticky_module.o \</pre>
<p>Now add sticky to the load balancer section of nginx config:</p>
<pre>[balancer]
recipe = gocept.nginx
nginx = nginx-build
...
http {
        client_max_body_size 64M;
        upstream zope {
                sticky;
                server ${hosts:client1}:${ports:client1} max_fails=3 fail_timeout=30s;
                server ${hosts:client2}:${ports:client2} max_fails=3 fail_timeout=30s;
                server ${hosts:client3}:${ports:client3} max_fails=3 fail_timeout=30s;
        }</pre>
<p>Reinstall nginx balaner configs and start-up scripts:</p>
<pre>bin/buildout install balancer</pre>
<p>See that generated configuration is ok:</p>
<pre>bin/nginx-balancer configtest</pre>
<p>Restart Nginx:</p>
<pre>bin/nginx-balancer stop ;bin/nginx-balancer start</pre>
<p>Check that some (non-anonymous) page has <em>route</em> cookie set by sticky module:</p>
<pre>Huiske-iMac:tmp moo$ wget -S http://yoursite.com/sisalto/secret-travel-destination-infoa
--2011-03-21 21:31:40--  http://yoursite.com/sisalto/secret-travel-destination-infoa
Resolving yoursite.com (yoursite.com)... 12.12.12.12
Connecting to yoursite.com (yoursite.com)|12.12.12.12|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Server: nginx/0.7.65
  Content-Type: text/html;charset=utf-8
  Set-Cookie: route=7136de9c531fcda112f24c3f32c3f52f
  Content-Language: fi
  Expires: Sat, 1 Jan 2000 00:00:00 GMT
  Set-Cookie: I18N_LANGUAGE="fi"; Path=/
  Content-Length: 41471
  Date: Mon, 21 Mar 2011 19:31:40 GMT
  X-Varnish: 1979481774
  Age: 0
  Via: 1.1 varnish
  Connection: keep-alive</pre>
<p>Now test it by doing manual session related activity and see that your shopping cart is not &#8220;lost&#8221;.</p>
<p>More info</p>
<ul>
<li><a href="http://code.google.com/p/nginx-sticky-module/source/browse/trunk/README">http://code.google.com/p/nginx-sticky-module/source/browse/trunk/README</a></li>
<li><a href="http://nathanvangheem.com/news/nginx-with-built-in-load-balancing-and-caching">http://nathanvangheem.com/news/nginx-with-built-in-load-balancing-and-caching</a></li>
</ul>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/03/21/session-affinity-sticky-with-nginx-load-balancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL-python connector on OSX</title>
		<link>http://blog.mfabrik.com/2011/03/02/installing-mysql-python-connector-on-osx/</link>
		<comments>http://blog.mfabrik.com/2011/03/02/installing-mysql-python-connector-on-osx/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 19:22:29 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[distribute]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[setuptools]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1042</guid>
		<description><![CDATA[Preconditions You are using MySQL installation from mysql.com (and not e.g. from Macports) You want to install MySQL-python egg using easy_install or buildout You&#8217;ll get an error Getting distribution for 'MySQL-python'. install_dir /Users/moo/project/eggs/tmp8-j13e sh: mysql_config: command not found Traceback (most recent call last): File "&#60;string&#62;", line 1, in ? File "/Users/moo/code/collective.buildout.python/python-2.4/lib/python2.4/site-packages/distribute-0.6.14-py2.4.egg/setuptools/command/easy_install.py", line 1855, in main [...]]]></description>
			<content:encoded><![CDATA[<p>Preconditions</p>
<ul>
<li>You are using MySQL installation from mysql.com (and not e.g. from Macports)</li>
<li>You want to install <a href="http://pypi.python.org/pypi/MySQL-python/">MySQL-python egg</a> using easy_install or buildout</li>
</ul>
<p>You&#8217;ll get an error</p>
<pre>Getting distribution for 'MySQL-python'.
install_dir /Users/moo/project/eggs/tmp8-j13e
sh: mysql_config: command not found
Traceback (most recent call last):
 File "&lt;string&gt;", line 1, in ?
 File "/Users/moo/code/collective.buildout.python/python-2.4/lib/python2.4/site-packages/distribute-0.6.14-py2.4.egg/setuptools/command/easy_install.py", line 1855, in main
 with_ei_usage(lambda:
 File "/Users/moo/code/collective.buildout.python/python-2.4/lib/python2.4/site-packages/distribute-0.6.14-py2.4.egg/setuptools/command/easy_install.py", line 1836, in with_ei_usage
 return f()  
...

 31, in &lt;lambda&gt;
 {'__file__':setup_script, '__name__':'__main__'}
 File "setup.py", line 15, in ?
 File "/var/folders/O8/O8pt7q52F7Oi+P3O0pNqq++++TI/-Tmp-/easy_install-g5cvxl/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
 File "/var/folders/O8/O8pt7q52F7Oi+P3O0pNqq++++TI/-Tmp-/easy_install-g5cvxl/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
EnvironmentError: mysql_config not found
An error occured when trying to install MySQL-python 1.2.3.Look above this message for any errors thatwere output by easy_install.
While:
 Installing instance.
 Getting distribution for 'MySQL-python'.
Error: Couldn't install: MySQL-python 1.2.3</pre>
<p>The reason is that MySQL installer puts MySQL under /usr/local and does not expose MySQL utilites directly to path. MySQL-python expects to find utility <em>mysql_config</em> to configure compile time paths when building native bindings using GCC.</p>
<p>Workaround:</p>
<pre>sudo -i
cd /usr/bin
ln -s /usr/local/mysql-5.1.46-osx10.5-x86_64/bin/mysql_config .</pre>
<p>Then rerun installer.</p>
<p>Though it is a bit harsh solution to modify system folder, it gets the thing done in simple manner.
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/03/02/installing-mysql-python-connector-on-osx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Changing the active Python interpreter on Windows</title>
		<link>http://blog.mfabrik.com/2011/02/22/changing-the-active-python-interpreter-on-windows/</link>
		<comments>http://blog.mfabrik.com/2011/02/22/changing-the-active-python-interpreter-on-windows/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 15:05:13 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[hashlib]]></category>
		<category><![CDATA[import error]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[regedit]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[start]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=992</guid>
		<description><![CDATA[A lot of Windows Python software use wrapper .exe files which pick the Python interpreter  based on this registry settings. One notable exe is buildout.exe, which is used to run buildout. If you install multiple Pythons, the latter installations might not become active in the registry automatically, and your Python wrapper still rely on the [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of Windows Python software use wrapper .exe files which pick the Python interpreter  based on this registry settings. One notable exe is buildout.exe, which is used to run <a href="http://www.buildout.org">buildout</a>.</p>
<p>If you install multiple Pythons, the latter installations might not become active in the registry automatically, and your Python wrapper still rely on the old version. This leads to version incompatibilities and you are unable to start the Python applications.</p>
<p>Since only one Python interpreter can be activate at a time, it is little bit difficult to develop multi-version Python code Windows.<br />
This kind of situation could be that you develop Plone 3 sites (Python 2.4) and Plone 4 sites (Python 2.6) simultaneously.</p>
<p>Below is regpy.py code which changes the active Python interpreter. The orignal author is unknown, I picked up this code from some paste board long time ago. Just run this code with your Python and the running interpreter becomes active.</p>
<p>Example how to activate alternative Python interpreter:</p>
<pre>C:\Plone\python\python.exe regpy.py</pre>
<p>regpy.py:</p>
<pre>import sys

from _winreg import *

# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix

regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
    installpath, installpath, installpath
)

def RegisterPy():
    try:
        reg = OpenKey(HKEY_LOCAL_MACHINE, regpath)
    except EnvironmentError:
        try:
            reg = CreateKey(HKEY_LOCAL_MACHINE, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print "*** Unable to register!"
            return
        print "--- Python", version, "is now registered!"
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print "=== Python", version, "is already registered!"
        return
    CloseKey(reg)
    print "*** Unable to register!"
    print "*** You probably have another Python installation!"

if __name__ == "__main__":
    RegisterPy()</pre>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/02/22/changing-the-active-python-interpreter-on-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easily install all Python versions under Linux and OSX using collective.buildout.python</title>
		<link>http://blog.mfabrik.com/2010/07/16/easily-install-all-python-versions-under-linux-and-osx-using-collective-buildout-python/</link>
		<comments>http://blog.mfabrik.com/2010/07/16/easily-install-all-python-versions-under-linux-and-osx-using-collective-buildout-python/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 07:47:45 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[collective]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[python imaging library]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=576</guid>
		<description><![CDATA[Here are short instructions how to install all versions (2.4, 2.5, 2.6, 2.7 and 3.1) of Python interpreters on UNIX system. The instructions were tested on Ubuntu 10.04 Lucid Lynx Linux but should work on other systems as is. The installation is based of downloading, compiling and installing different Pythons and their libraries using buildout [...]]]></description>
			<content:encoded><![CDATA[<p>Here are short instructions how to install all versions (2.4, 2.5, 2.6, 2.7 and 3.1) of Python interpreters on UNIX system. The instructions were tested on Ubuntu 10.04 Lucid Lynx Linux but should work on other systems as is. The installation is based of downloading, compiling and installing different Pythons and their libraries using <a href="http://www.buildout.org">buildout </a>tool. <a href="http://svn.plone.org/svn/collective/buildout/python/">A buildout configuration for doing this</a> is maintained by a <a href="http://plone.org">Plone</a> community.</p>
<p>This buildout is especially useful to get Python 2.4 properly running under the latest Ubuntu 10.04 Lucid Lynx. This is because Ubuntu repositories won&#8217;t ship with Python 2.4 packages anymore.</p>
<p>The installation will also include static compilation of some very popular libraries. These are dependencies for other Python packages including, but not limited, to</p>
<ul>
<li>libjpeg</li>
<li>Python imaging library</li>
<li>readline</li>
</ul>
<h2>Prerequisites</h2>
<ul>
<li>Some Python version is installed (OS default)</li>
<li>GCC compiler is installed (sudo apt-get install build-essential)</li>
<li>Subversion tool is installed (sudo apt-get install subversion)</li>
</ul>
<h2>Running it</h2>
<pre>svn co http://svn.plone.org/svn/collective/buildout/python/
cd python
python bootstrap.py
bin/buildout</pre>
<h2>Using it</h2>
<p>All Pythons are under <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> installations. This means that you can activate one Python configuration for your shell once easily (<em>python</em> command will run under different Python versions).</p>
<p>Activating Python 2.4</p>
<pre>source python/python-2.4/bin/activate
(python-2.4)moo@murskaamo:~/code$ python -V
Python 2.4.6</pre>
<p>Check that Python Imaging Library works</p>
<pre>python
Python 2.4.6 (#1, Jul 16 2010, 10:31:46)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import PIL</pre>
<p>(No exceptions raised, Python Imaging Library works well).
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/07/16/easily-install-all-python-versions-under-linux-and-osx-using-collective-buildout-python/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Using paster local commands with buildout and avoiding the infamous dependency issue</title>
		<link>http://blog.mfabrik.com/2010/04/13/using-paster-create-command-with-buildout-and-avoiding-the-infamous-dependency-issue/</link>
		<comments>http://blog.mfabrik.com/2010/04/13/using-paster-create-command-with-buildout-and-avoiding-the-infamous-dependency-issue/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 14:44:26 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[paster]]></category>
		<category><![CDATA[zope]]></category>
		<category><![CDATA[zopeskel]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=479</guid>
		<description><![CDATA[Introduction Paste script is a part of Python Paste web development utilities. Its paster create command is used by various Python frameworks to generate skeleton code for a development project. Paster and local commands Besides generic project templates, paster provides local commands which are project aware commands to add more modules into an existing project. [...]]]></description>
			<content:encoded><![CDATA[<h4>Introduction</h4>
<p><a href="http://pythonpaste.org/script/">Paste script</a> is a part of <a href="http://en.wikipedia.org/wiki/Python_Paste">Python Paste</a> web development utilities.</p>
<p>Its <em>paster create</em> command is used by various Python frameworks to generate skeleton code for a development project.</p>
<h4>Paster and local commands</h4>
<p>Besides generic project templates, <em>paster </em> provides <em>local commands</em> which are project aware commands to add more modules into an existing project. Local commands are made available by paster extensions. For example, <a href="http://plone.org/products/zopeskel">ZopeSkel</a> product has various local commands to generate skeletons into Plone/Zope projects automatically</p>
<ul>
<li>Views</li>
<li>Content types</li>
<li>Forms</li>
<li>Portlets</li>
</ul>
<p>&#8230; and so on.</p>
<p>For example, you could generate a project template for Plone add-on module and then create content types there using a local paster command. The local commands become available when you execute paster command in the folder of your project.</p>
<p>Example:</p>
<pre>paster create -t archetype myorg.customploneaddon
cd src/myorg.customploneaddon

# Now new paster commands are available
paster

Usage: ../../bin/paster COMMAND
usage: paster [paster_options] COMMAND [command_options]

...

Commands:
  ...

ZopeSkel local commands:
  addcontent   Adds plone content types to your project</pre>
<p>Above, ZopeSkel paster template adds its addcontent templates. Now you can use addcontent local command to contribute to the existing project</p>
<pre>paster addcontent -t contenttype MyShinyWebPage</pre>
<h5>ZopeSkel</h5>
<p>For more information how to use paster to create add-ons and add-on submodules for Plone, <a href="http://www.coactivate.org/projects/plone-conference-2008-dc/zopeskel">see here</a>.</p>
<p>To see list of available paster local commands, run paster command</p>
<pre>../../bin/paster addcontent --list</pre>
<p>&#8230; in your development project. For ZopeSkel specific projects the output should be something like this:</p>
<pre>Available templates:
    atschema:     A handy AT schema builder
    contenttype:  A content type skeleton
    form:         A form skeleton</pre>
<h4>How paster local commands work</h4>
<p>paster reads (evaluates) <em>setup.py</em> file which declares a Python egg. If it founds <em>paster_plugins</em> section there, it will look for local commands there. For example, Plone project templates declare the following paste_plugins in setup.py:</p>
<pre>paster_plugins = ["ZopeSkel"]</pre>
<h4>setup.py install_requires</h4>
<p>Python modules can dependencies to other modules using setup.py and <em>install_requires</em> section. For example, a Plone add-on might read:</p>
<pre>install_requires=['setuptools',
                  # -*- Extra requirements: -*-
                  "five.grok",
                  "plone.directives.form"
                  ],</pre>
<p>This means that when you use <em>setuptools</em>/<em>buildout</em>/<em>pip</em>/<em>whatever</em> Python package installation tool to install a package from <a href="http://pypi.python.org/pypi">Python Package Index (PyPi)</a> it will also automatically install dependency packages declared in install_requires.</p>
<h5>paster and install_requires</h5>
<p>This is where things usually go haywire.</p>
<p>Let&#8217;s assume you are using paster in a project which contains N python packages. You probably use an external configuration system to manage your installed applications and their versions to make repeatable deployments possible (hint: <a href="http://www.buildout.org">buildout</a> is gaining traction in Python community lately).</p>
<p>Paster is not aware of this external Python package configuration set (paster cannot see them in its PYTHONPATH). So what happens when you try to execute <em>paster create</em> which reads setup.py containing <em>install_requires</em> and encounters dependencies?</p>
<p>Paster will try automatically download and install them <strong>locally in that folder</strong>.</p>
<p>Plone and Zope ecosystem contains over hundreds of reusable components, in nice dependency hierarchy. <em>paster create</em> would try to pull all them in to your source tree as <em>*.egg</em> folders. <a href="http://n2.nabble.com/Correct-way-to-use-paster-with-buildout-tp4555533p4558043.html">See discussion here</a>.</p>
<div class="warning">
<h5 class="first">Warning</h5>
<p style="padding-left: 30px;"><span style="color: #ff0000;">Do not never use system paster command.</span></p>
</div>
<p style="padding-left: 30px;"><span style="color: #ff0000;">Do not ever run </span><em><span style="color: #ff0000;">sudo easy_install ZopeSkel</span></em><span style="color: #ff0000;">. Do not ever run paster local commands using a paster command from your system-wide Python installation.</span></p>
<div class="warning">
<h5 class="first">Warning</h5>
<p style="padding-left: 30px;"><span style="color: #ff0000;">The internet is full of tutorial saying </span><em><span style="color: #ff0000;">easy_install ZopeSkel</span></em><span style="color: #ff0000;">. If you ever encounter this kind of tutorial, it&#8217;s wrong.</span></p>
</div>
<h4>Paste and buildout</h4>
<p>If you are using buildout to manage your Python application deployment, you can integrate paster nicely with it.</p>
<p>Add to your <em>buildout.cfg</em>:</p>
<pre>parts =
    ...
    paster

[paster]
recipe = zc.recipe.egg
eggs =
        PasteScript
        ZopeSkel
        ${instance:eggs}</pre>
<p>After rerunning buildout, buildout adds <em>paster</em> command to <em>bin</em> folder.</p>
<p>Then you can run paster from buildout folder:</p>
<pre>bin/paster</pre>
<p>&#8230; or in a buildout managed project under src folder&#8230;</p>
<pre>../../bin/paster</pre>
<p>This way paster is aware of your deployment configuration and local commands won&#8217;t explode on your face anymore.</p>
<p>Thanks Martin Aspeli to helping with how buildout + paster should be done.
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/04/13/using-paster-create-command-with-buildout-and-avoiding-the-infamous-dependency-issue/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Installing Python Imaging Library (PIL) under virtualenv or buildout</title>
		<link>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/</link>
		<comments>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 20:58:16 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[satchmo]]></category>
		<category><![CDATA[site packages]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=349</guid>
		<description><![CDATA[I have greatly struggled to have PIL library support in isolated Python environments like virtualenv &#8211;no-site-packages. For example, when installing Satchmo shop under virtualenv: ../bin/clonesatchmo.pyhe Python Imaging Library is not installed. Install from your distribution binaries. ../bin/clonesatchmo.py The Python Imaging Library is not installed. Install from your distribution binaries. Though it clearly is there, installed [...]]]></description>
			<content:encoded><![CDATA[<p>I have greatly struggled to have PIL library support in isolated Python environments like virtualenv &#8211;no-site-packages.</p>
<p>For example, when installing <a href="http://www.satchmoproject.com/">Satchmo</a> shop under virtualenv:</p>
<pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">../bin/clonesatchmo.pyhe Python Imaging Library is not installed. Install from your distribution binaries.</div>

../bin/clonesatchmo.py
The Python Imaging Library is not installed. Install from your distribution binaries.</pre>
<p>Though it clearly is there, installed by <em>easy_install PIL </em>command:</p>
<pre>ls ../lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg
ArgImagePlugin.py	 ExifTags.py		  GimpGradientFile.pyc...</pre>
<p>Does anyone know if this problem is with PIL itself, eggified PIL or something else?</p>
<p>In any case, there is an easy workaround: use system-wide PIL (sudo apt-get install python-imaging) and symlink PIL from your site-wide installation under the isolated Python environment:</p>
<pre>(satchmo-py25)mulli% pwd
/srv/plone/mmaspecial/satchmo-py25/lib/python2.5/site-packages
(satchmo-py25)mulli% ln -s /usr/lib/python2.4/PIL .</pre>
<div>That works for now, but I&#8217;d like to learn how to make virtualenv and buildout install PIL egg bullet-proof way.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mysterious buildout error &#8211; missing docs/HISTORY.txt file</title>
		<link>http://blog.mfabrik.com/2008/10/01/mysterious-buildout-error-missing-docshistorytxt-file/</link>
		<comments>http://blog.mfabrik.com/2008/10/01/mysterious-buildout-error-missing-docshistorytxt-file/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 15:55:03 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[Plone (old)]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[easy_install]]></category>
		<category><![CDATA[egg]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[site packages]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=128</guid>
		<description><![CDATA[I was getting the following error with Plone buildout &#8230; Develop: '/home/moo/workspace/collective.easytemplate' Traceback (most recent call last): File "/tmp/tmp_G8621", line 11, in ? File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 931, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26, in run_setup [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting the following error with Plone buildout</p>
<p>&#8230;</p>
<pre>Develop: '/home/moo/workspace/collective.easytemplate'
Traceback (most recent call last):
  File "/tmp/tmp_G8621", line 11, in ?
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 931, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 919, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26, in run_setup
    DirectorySandbox(setup_dir).run(
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 63, in run
    return func()
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 29, in &lt;lambda&gt;
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 9, in ?
    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 166, in _open
    return _open(path,mode,*args,**kw)
IOError: [Errno 2] No such file or directory: 'docs/HISTORY.txt'
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/moo/workspace/Plone-3.1/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/buildout.py", line 1477, in main
    getattr(buildout, command)(args)
  File "/home/moo/workspace/Plone-3.1/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/buildout.py", line 324, in install
    installed_develop_eggs = self._develop()
  File "/home/moo/workspace/Plone-3.1/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/buildout.py", line 556, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/home/moo/workspace/Plone-3.1/eggs/zc.buildout-1.1.1-py2.4.egg/zc/buildout/easy_install.py", line 868, in develop
    assert os.spawnl(os.P_WAIT, executable, _safe_arg (executable), *args) == 0
AssertionError</pre>
<p>My product had docs folder. HISTORY.txt was there properly. This made me scratch my head for a while.</p>
<p>Buildout calls easy_install as an external process. If easy_install eggs have dependencies in their setup.py easy_install tries to download and install these eggs.</p>
<p><strong>There is no reported progress what eggs are installed in easy_install process created from buildout. </strong>Looks like buildout verbosity (-v) switch does not reach easy_install.</p>
<p>So the problem was not in my product, but in its dependency. However the debug output did not reveal that we were dealing with a dependency. Is there easy means to solve this kind of problems? I bluntly put debug prints inside my server wide setuptools Python files to known which was the faulty dependency.</p>
<p>It turned out that easy_install was trying to execute setup.py against a downloaded source distribution (.tar.gz). I had the same egg as a local source code copy. The source code contains docs folder, the egg doesn&#8217;t.</p>
<p>The solution was to change buildout.cfg develop directive to be the same as the flattened dependency order of the eggs (dependencies come top). This way setup.py was evaluated correctly against the source code folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/10/01/mysterious-buildout-error-missing-docshistorytxt-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Python code management &amp; deployment &#8211; a glance at zc.buildout and few others</title>
		<link>http://blog.mfabrik.com/2008/09/02/python-code-management-deployment-a-glance-at-zcbuildout-and-few-others/</link>
		<comments>http://blog.mfabrik.com/2008/09/02/python-code-management-deployment-a-glance-at-zcbuildout-and-few-others/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 08:24:47 +0000</pubDate>
		<dc:creator>Tuukka Mustonen</dc:creator>
				<category><![CDATA[development tools]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[zope]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[code management]]></category>
		<category><![CDATA[paver]]></category>
		<category><![CDATA[virtualenv]]></category>
		<category><![CDATA[zc.buildout]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=104</guid>
		<description><![CDATA[We&#8217;ve been using zc.buildout for Plone deployment and it&#8217;s working out great. A few days ago implemented a buildout recipe for Django project deployment, automatic web configuration, symlinking, media-folder structuring etc. and while I got it working, I came up with twisted feelings. Buildout is from the creators of Zope (I suppose) so you can [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using <a href="http://pypi.python.org/pypi/zc.buildout/1.1.1">zc.buildout</a> for <a href="http://www.plone.org">Plone</a> deployment and it&#8217;s working out great. A few days ago implemented a buildout recipe for <a href="http://www.djangoproject.org">Django</a> project deployment, automatic web configuration, symlinking, media-folder structuring etc. and while I got it working, I came up with twisted feelings.</p>
<p>Buildout is from the creators of <a href="http://www.zope.org/">Zope</a> (I suppose) so you can expect a powerful project code management tool. The question is, however, whether or not it suits your needs. In my case I found out it too heavy. I mean, to add even a simple task you have to create a new &#8220;recipe&#8221; (a package) that does the tricks. Of course some recipes are generic (found from <a href="http://pypi.python.org">PyPi</a>) and you can just run them with your own INI options, but in my case I had to do some custom implementation. Creating a new python package isn&#8217;t that hard for sure <img src='http://blog.mfabrik.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  but there&#8217;s of course some learning curve, so the <em>real</em> question is should you spend time to learn it or not?</p>
<p>I found out that zc.buildout has some nice features like:</p>
<ul>
<li> Automatic requirements processing through setuptools</li>
<li>Automatic (yet simple) removal of directories during recipe uninstall</li>
<li>Clear structure (install(), update() &amp; uninstall() methods)</li>
<li>INI-syntax, python does have a clear syntax but INI is always clearer for a newbie</li>
<li>Easy script creation (adjust python paths somewhat automatically)</li>
<li>Easily repeatable</li>
<li>Passing of arguments from one recipe to another</li>
<li>etc.</li>
</ul>
<p>The problems?</p>
<ul>
<li>It takes a while to learn zc.buildout</li>
<li>It takes &#8216;another while&#8217; to learn to write recipes</li>
<li>Too much hassle for little things</li>
<li>INI-syntax is very limited in features</li>
<li>Buildout easily updates all your packages (that means also the ones you didn&#8217;t want to!)</li>
<li>Lack of documentation (it has good docs to get you going.. but after a while it leaves you with open questions)</li>
<li>Unnecessary overhead (for each script you launch, you&#8217;ll need a launcher script created via buildout)</li>
</ul>
<p>There&#8217;s no denying zc.buildout is powerful, but I wouldn&#8217;t use it for projects which need reasonable amount of customization. It&#8217;s just plain easier and quicker to write shell scripts and while those won&#8217;t provide you with any sort of ready tools you won&#8217;t propably need them. For bringing up somewhat static environment, where you don&#8217;t need to hack things (like that for Plone) it&#8217;s quite a decent option, however.</p>
<p>I also explored alternatives to zc.buildout. I&#8217;ve been reading about earlier virtualenv but haven&#8217;t really tried it out until now. It looks very promising and creates a more flexible environment compared to zc.buildout. Of course their goals are not exactly the same. Also, there are a few other alternatives out there, among them a new Python code management tool called <a href="http://www.blueskyonmars.com/projects/paver/">Paver</a> (just look at that cool logo.. it does remind you of Indiana Jones, does it not?). I glanced through the Paver docs and it looks like it <em>might</em> be the way to go (Paver also supports virtualenv), but didn&#8217;t quite get the grasp of the benefits just yet. Anyway, if you are still interested in code management and deployment, I&#8217;d recommend you to read the <a href="http://www.blueskyonmars.com/2008/04/22/paver-and-the-building-distribution-deployment-etc-of-python-projects/">Paver release announcement</a> and also <a href="http://www.blueskyonmars.com/projects/paver/foreword.html">Paver forewords</a>. They should clear things up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/09/02/python-code-management-deployment-a-glance-at-zcbuildout-and-few-others/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

