[Twisted-Python] os x installer, multiple source locations

Phil Christensen phil at bubblehouse.org
Sat Sep 5 22:08:06 EDT 2009


On Sep 4, 2009, at 7:50 PM, Matt Bennett wrote:
> Hello all,
>
> I used the Twisted 8.2.0 for OS X 10.5 installer from [1] to install
> twisted on my mac. I don't understand why, but I seem to have two
> copies of the source on the disk

This is a frustrating partial install of Twisted that ships with OS X  
(AFAIK just to support iCal Server). Interestingly enough, it's gone  
from Snow Leopard; the calendar server must use something else these  
days...

You have two options. One option is to create a .pth file that points  
to your twisted source dir (I used this method since I was running SVN  
head). My twisted.pth file in site-packages looks like this:

import sys; sys.path = [s for s in sys.path if s != '/Library/Python/ 
2.5/site-packages']
import sys; sys.path.insert(0, '/Library/Python/2.5/site-packages')
import sys; sys.path.insert(0, '/Users/phil/Workspace/Twisted')

But honestly, I think all you'd really need is the last line. I don't  
develop on my 10.5 machine anymore, so I don't exactly remember why I  
did some of this ;-)

Another option I hadn't considered until now is to just remove that  
existing Twisted install. Unless you use iCal server it doesn't get  
used by anything else in the OS, so you should be fine. You could  
always zip it just to be safe.

Hope my ramblings help in some way ;-)

-phil



More information about the Twisted-Python mailing list