<?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>god morgon! &#187; mod_wsgi</title>
	<atom:link href="http://god.morgon.nu/tag/mod_wsgi/feed/" rel="self" type="application/rss+xml" />
	<link>http://god.morgon.nu</link>
	<description></description>
	<lastBuildDate>Fri, 23 Oct 2009 13:35:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mod_wsgi 2.5 with macports python 2.6</title>
		<link>http://god.morgon.nu/2009/05/11/mod_wsgi-25-with-macports-python-26/</link>
		<comments>http://god.morgon.nu/2009/05/11/mod_wsgi-25-with-macports-python-26/#comments</comments>
		<pubDate>Mon, 11 May 2009 12:15:21 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://god.morgon.nu/?p=100</guid>
		<description><![CDATA[Update 2009-10-23: This post is totally obsolete. Snow Leopard is out and mod_wsgi 2.5 is available in macports. 
Graham Dumpleton released mod_wsgi 2.5 today. He&#8217;s has implemented workarounds on the issues I had while compiling mod_wsgi 2.4 with macports python 2.6.
Getting mod_wsgi to work on your precious mac is now as easy as
$ wget http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz
$ [...]]]></description>
			<content:encoded><![CDATA[<p class="highlight"><strong>Update 2009-10-23:</strong> This post is totally obsolete. Snow Leopard is out and mod_wsgi 2.5 is available in macports. </p>
<p><a href="http://blog.dscpl.com.au/">Graham Dumpleton</a> released <a href="http://modwsgi.org/">mod_wsgi</a> <a href="http://code.google.com/p/modwsgi/wiki/ChangesInVersion0205">2.5</a> today. He&#8217;s has implemented workarounds on the issues I had while compiling <a href="http://god.morgon.nu/2009/04/13/mod_wsgi-24-with-macports-python-26/">mod_wsgi 2.4 with macports python 2.6</a>.</p>
<p>Getting mod_wsgi to work on your precious mac is now as easy as</p>
<pre><code>$ wget http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz
$ tar -xzvf mod_wsgi-2.5.tar.gz &amp;&amp; cd mod_wsgi-2.5 &amp;&amp; ./configure
$ make &amp;&amp; sudo make install</code></pre>
<p>Don&#8217;t forgett to restart apache afterwards. 1.1 is still the latest version of mod_wsgi in macports. Don&#8217;t use it, it&#8217;s obsolete. If you still have problems getting mod_wsgi 2.5 to work, check the <a href="http://code.google.com/p/modwsgi/wiki/ChangesInVersion0205">details of the changelog</a> and my previous post about <a href="http://god.morgon.nu/2009/04/13/mod_wsgi-24-with-macports-python-26/">mod_wsgi 2.4 with macports python 2.6</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://god.morgon.nu/2009/05/11/mod_wsgi-25-with-macports-python-26/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>mod_wsgi 2.4 with macports python 2.6</title>
		<link>http://god.morgon.nu/2009/04/13/mod_wsgi-24-with-macports-python-26/</link>
		<comments>http://god.morgon.nu/2009/04/13/mod_wsgi-24-with-macports-python-26/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 21:39:22 +0000</pubDate>
		<dc:creator>Andreas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://god.morgon.nu/?p=41</guid>
		<description><![CDATA[Update 2009-10-23: This post is totally obsolete. Snow Leopard is out and mod_wsgi 2.5 is available in macports. 
Update 2009-05-11: mod_wsgi 2.5 is now available, check out my post on mod_wsgi 2.5 with macports python 2.6 instead.
Quick how-to

wget http://modwsgi.googlecode.com/files/mod_wsgi-2.4.tar.gz
tar -xzvf mod_wsgi-2.4.tar.gz &#38;&#38; cd mod_wsgi-2.4 &#38;&#38; ./configure
Edit Makefile with your favorite editor, replace everything after the [...]]]></description>
			<content:encoded><![CDATA[<p class="highlight"><strong>Update 2009-10-23:</strong> This post is totally obsolete. Snow Leopard is out and mod_wsgi 2.5 is available in macports. </p>
<p class="highlight"><strong>Update 2009-05-11:</strong> mod_wsgi 2.5 is now available, check out my post on <a href="http://god.morgon.nu/2009/05/11/mod_wsgi-25-with-macports-python-26/">mod_wsgi 2.5 with macports python 2.6</a> instead.</p>
<h2>Quick how-to</h2>
<ul>
<li>wget <a href="http://modwsgi.googlecode.com/files/mod_wsgi-2.4.tar.gz">http://modwsgi.googlecode.com/files/mod_wsgi-2.4.tar.gz</a></li>
<li>tar -xzvf mod_wsgi-2.4.tar.gz &amp;&amp; cd mod_wsgi-2.4 &amp;&amp; ./configure</li>
<li>Edit Makefile with your favorite editor, replace everything after the = on the LDFLAGS line with the output from python2.6-config &#8211;ldflags</li>
<li>make &amp;&amp; sudo make install  and restart apache when done.</li>
<li>Confirm with otool -L /opt/local/apache2/modules/mod_wsgi.so</li>
</ul>
<h2>Long story</h2>
<p><a href="http://www.macports.org/">Macports</a> can be a pain sometimes. I think I will switch to a <a href="http://www.python.org">python.org</a> package of python soon and through out python from my macports. Anyway I just wanted to share how I compilled mod_wsgi 2.4 for my macports installed <a href="http://www.apache.org/">apache2</a> and python 2.6. Since the current version of mod_wsgi at the time of writing this is the obsolete 1.1 I went to <a href="http://www.modwsgi.org">modwsgi.org</a> and downloaded the source for 2.4.</p>
<p>First I just ran ./configure, make, sudo make install as usual when compiling stuff. Everything seemed fine but I noticed some wierdness in the apache error log:</p>
<pre><code>[Mon Apr 13 17:26:57 2009] [warn] mod_wsgi: Compiled for Python/2.6.1.
[Mon Apr 13 17:26:57 2009] [warn] mod_wsgi: Runtime using Python/2.5.1.</code></pre>
<p>Apparently my mod_wsgi was indeed compiled against the correct python but for some reason it went witht he os x python in runtime, which screwed up a lot of things.</p>
<p>After a lot of googling I was <a href="http://code.google.com/p/modwsgi/issues/detail?id=28">pretty</a> <a href="http://trac.macports.org/ticket/18879">sure</a> I needed to edit the generated Makefile by ./configure to solve this problem. The output from:</p>
<pre><code>$ otool -L /opt/local/apache2/modules/mod_wsgi.so</code></pre>
<p>clearly showed os x shipped python 2.5 invloved somehow. None of the suggestions in the links I found gave me the correct LDFLAGS needed to compile it proper. Instead after some more googling I found <a href="http://trac.macports.org/ticket/18848">this</a> which learned me that I could just run:</p>
<pre><code>$ python2.6-config --ldflags</code></pre>
<p>to get the correct ldflags. I took the output of the above command and put it into the mod_wsgi ./configure generated Makefile on the LDFLAGS line then just make and sudo make install.</p>
<p>Restarting apache now showed me</p>
<pre><code>Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 mod_wsgi/2.4 Python/2.6.1 configured -- resuming normal operations</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://god.morgon.nu/2009/04/13/mod_wsgi-24-with-macports-python-26/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
