SQLObject — OS/X

November 29th, 2005 § 0 comments

Build­ing on my SQLOb­ject post from Yes­ter­day I fig­ured out spit out my notes from set­ting SQLOb­ject up on my Power­book (with Postgresql).

Now, you’ll need to sat­isfy some depen­den­cies first — I’m doing this from the point of view of get­ting it to work with Post­greSQL — not any of the other DBs it supports.

Grab the post­gres dis­tri­b­u­tion from: PGSQL For Mac This dis­tri­b­u­tion is nice, as it con­tains an installer, as well as a con­trol panel and other util­i­ties for post­gresql. It’s con­ve­nient for “1 click Setup” This pack­age installs every­thing in /Library/PostgreSQL8/

Once that’s done, you’ll need to install MX Date Time (Get the Source .tar.gz) (This is a Psy­copg depen­dency). Because the ver­sion of SQLOb­ject I am using does not sup­port the lat­est rev of psy­copg, I had to fall back to ver­sion 1 of psy­copg, which forced my to pull in MX Date time.

Set­ting up MXDate­Time is a sim­ple affair of grab­bing that source tar­ball, unpack­ing it, cd’ing into the direc­tory and doing a sudo python setup.py install

With that done, you need to down­load and install Psy­copg ver­sion 1 — ver­sion 2 won’t work. You can grab it from here.

After unpack­ing it, you’ll need to do a spe­cial ./configure line — like this:

(this is all 1 line!)
./configure –with-postgres-libraries=/usr/local/pgsql/lib
–with-postgres-includes=/usr/local/pgsql/include
–with-mxdatetime-includes=/System/Library/Frameworks/Python.framework/
Versions/2.3/lib/python2.3/site-packages/mx/DateTime/mxDateTime

Then do a make, and an sudo make install

Now it’s time to down­load SQLOb­ject from here (I grabbed the source tar­ball. Unpack that zip, and do the nor­mal sudo python setup.py install If it prompts you, let it down­load setuptools.

Viola! You should now be ready to start the post­gres server (after pok­ing a hole in the OS/X fire­wall for port 5432) and make a new data­base, or sim­ply pick up the handy SQL Object Docs.

What's this?

You are currently reading SQLObject — OS/X at jessenoller.com.

meta