wiki:TracOnOsx

Version 1 (modified by trac, 17 years ago) (diff)

--

Installing and running Trac on Mac OSX

Fink (http://fink.sf.net/) can be used to install most of Trac's dependencies:

 $ apt-get install sqlite
 $ fink install svn-client svn-swig-py

Subversion is currently in fink's unstable tree (this will probably change soon). This means that you have to use fink to compile the packages instead of simply using apt-get to download the binaries directly. This will take some time but should work.

The last two dependencies (pysqlite and clearsilver) can't be installed using fink, you have to download and install them manually.

clearsilver

Download latest version from http://www.clearsilver.net/. Compile it with Python support and install it in the fink prefix.

 $ ./configure --prefix=/sw/ --with-python=/sw/bin/python2.3
 $ make install

You might have to modify some some hard coded /usr/local/bin/python path to /sw/bin/python2.3 in some file when running make install.

pysqlite

The file setup.py in the pysqlite distribution doesn't recognize the darwin platform so you'll have to add the following lines to setup.py (it should be quite obvious where):

elif sys.platform == "darwin":
    include_dirs = ['/sw/include/']
    library_dirs = ['/sw/lib/']
    libraries = [sqlite]
    runtime_library_dirs = []
    extra_objects = []

After that modification the installation should simply be:

 $ /sw/bin/python2.3 ./setup.py install

Installing Trac itself

You should now be all set to install Trac using the TracInstall instructions. Make sure to use /sw/bin/python2.3 when running the setup.py script.

I had some problems getting apples personal web-server (apache 1.3) to run trac.cgi with the correct python interpreter (/sw/bin/python2.3) so I placed this dummy trac.cgi in /Library/WebServer/CGI-Executables/:

#! /bin/sh
/sw/bin/python2.3 /somewhere/cgi-bin/trac.cgi

Keep in mind that these instructions were written from the top of my mind and might be incomplete and contain some errors. If you find any errors please correct them by editing this page and/or contacting me -- JonasBorgstrom?