Oct 31 2009

Building Plone 4.0 core-dev on OS X Leopard 10.5

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’s more than 200 people sprinting on saturday and sunday, improving Plone in all area’s: documentation, code, add-ons, you name it.

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’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 10.5 .

Python 2.6

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’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.

Florian Schulze created a buildout builds python 2.4/2.5 and 2.6 for you, paying attention to all the dependencies. It’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’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.

Distribute madness

After fetching the Plone 4 development branch from http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0 ,  doing a python2.6 bootstrap.py and running bin/buildout, the buildout coun’t install mr.developer.

# ImportError: <module ’setuptools.dist’ from ‘/Users/fred/buildouts/pythons/python-2.6/lib/python2.6/site-packages/distribute-0.6.3-py2.6.egg/setuptools/dist.pyc’> has no ‘check_packages’ attribute
# An error occured when trying to install mr.developer 1.1.Look above this message for any errors thatwere output by easy_install.

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.

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!

mr.developer is drunk

Buildout finished with a report that mr.developer couldn’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.

Swallow the blue PILl

bin/instance fg to start Plone 4 and…… 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’s an easy way to add the Python Imaging (alias PIL) to your virtualenv by running easy_install http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz .

And we’re up and running with a Plone 4 test buildout on OS X Leopard 10.5 . Finally.

Update 1

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 port search  python26. 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.

plone4


Oct 6 2009

Airfoil Speakers – asking does help

airfoilWith Rogue Amoeba’s Airfoil tool you can stream audio from any Mac application to  speakers that are connected to an Airport Express, not just from within iTunes. It’s a pitty that you need these wireless basestation just to stream audio and the people at RogueAmoeba thought just the same: they released the free Airfoil Speakers addon: install it on a Mac, PC or Linux based computer and you have an extra output for Airfoil. And recently even an Airfoil speakers for Iphone/Ipod touch was released. Unfortunately good old iTunes still ignores Airfoil Speakers. Why hasn’t apple released a system preference or sharing option for this? I mean, if they can do it for MacBook Air DVD drives, why not for an audio output…..

So alls well that ends well with Airfoil. Not quite. I still had one major issue. Airfoil Speakers always play to the default System Audio output. You can set it in System Preferences if you have more than one audio interface, like an iMic or extra audio card in your Mac Pro. There was no way to select an extra audio output in Airfoil Speakers.  Why would I want this? If I can redirect Airfoil Speakers to my iMic and hook that up to my stereo set I can at the same time use my default audio output for application sounds, and the occasional game. And I can stream music from my MacMini media hub to several Airtunes/Airfoil speakers setup throughout the house (the kitchen, the hobby room, you name it) without having to buy Airport Express basestation when there are already computers in the room.

So I asked the Rogue Amoeba crew for an extra option to select audio output. I got a confirmation that it was an interesting feature. Then it became silent fore a few months. And with a recent update (3.3.4, but it might have been added in 3.3), there it was….  a shiny new pull down selector. Thanks RogueAmoeba!

airfoil-speakers


Sep 11 2009

Control iTunes DJ from your Mac

itunes-dj1Apple released the wonderfull iTunes Remote application, called ‘Remote’. You can control an iTunes Application running on a mac in your local network over WiFi. Also integrated into  ‘Remote’ is iTunes DJ. Everybody with an iPhone can request new songs and/or upvote songs currently in the DJ queue. Greap app.

My iTunes library is on our MacMini home server so I can play the songs in my library everywhere. But when I’m working on my laptop I don’t want to start iTunes Remote on my iPhone just to skip a song on the MacMini. And there’s the catch. I can start iTunes on my laptop and I can see the shared library on the MacMini, but I cannot control DJ. Where’s the iTunes Remote app for Mac OS X?

Fortunately: there is a cool open source app iTunes Remote Control, iTRC in short. I had already used it to control iTunes remotely for my ‘normal’ library, but it also works with iTunes DJ: it’s just another playlist that is filled automatically. And now I can skip iTunes DJ suggestions. Jay!

itrc1

Update october 6th 2009: Unfortunately iTRC does not work with the latest iTunes 9.0.1