Post details: Redland Python bindings on Mac OS X
2009-02-24
Redland Python bindings on Mac OS X
If you need to install Redland Python bindings on Mac OS X then one of the ways is to use MacPorts:
sudo port install redland-bindings +python25
It is just one command and all dependencies will be installed automatically. (Though I usually install python25 with a separate command)
There is a cost to this because MacPorts would compile its own version of Python and as a result the installation might take a while. This is due to MacPorts policy to install all the prerequisites.
Context: I was having issues installing Redland Python bindings on Mac OS X and it seemed that nobody around me had them working either. MacPorts turned out to be the easiest way to do this.
See also:
Comments, Pingbacks:
./configure --with-python=/usr/bin/python --with-redland=system LIBS='-lraptor -lrasqal -lsqlite3'
somewhere along the way I may have got this approach working as well but it is not as trivial as one line of shell commands (assumes you are familiar with compiling from source, installing prerequisites, etc).
I hope MacPorts will allow Redland and its Python bindings be used by people who do not necessarily have knowledge or willingness to compile stuff and just want a easy way to install this RDF library.
I tried a few hours and still can't get it to build properly on Mac. MacPort rocks..
I used this configure invocation:
./configure --prefix=/usr/local/redland --with-python=/sw/bin/python2.6 --with-python-ldflags="-Wl,-F. -bundle -L/sw/lib/python2.6/config -ldl -lpython2.6" LIBS="-L/usr/local/redland/lib -lraptor -lrasqal"
You probably need to change this for your own system:
* change the prefix for the installation
* put in your python binary
* put the output of "my-python-version-config --ldflags" in the --with-python-ldflags argument.
* also put "-Wl,-F. -bundle" in the --with-python-ldflags argument.
* add the LIBS string with all database libraries and raptor and rasqal libraries and their respective paths.
(I filed a bug for the fact that these are not all detected, lets see how that goes.)
Thanks for sharing tips on how to compile them.
Parameters that you describe are very similar to those that MacPorts uses internally when compiling the port.
I ended up by linking "/Library/Frameworks/Python.framework/Versions/2.6/Python" to "/usr/lib/libpython2.6.dylib" and using the following configure options, making and installing as I worked my way serially through the packages.
raptor:
./configure \
--prefix=/usr/local/redland
rasqal:
./configure \
--prefix=/usr/local/redland \
--with-redland=../redland-1.0.9
redland-1.0.9:
./configure \
--prefix=/usr/local/redland \
--with-bdb=/usr/local/BerkeleyDB.4.7 \
--with-bdb-lib=/usr/local/BerkeleyDB.4.7/lib \
--with-bdb-include=/usr/local/BerkeleyDB.4.7/include \
--with-mysql=/usr/local/mysql/bin/mysql_config
redland-1.0.8-bindings:
./configure --prefix=/usr/local/redland \
--with-python=/usr/local/bin/python2.6 \
--with-python-ldflags="-dynamiclib -ldl -lpython2.6" \
--with-python-libext="dylib"
Hope this helps someone.
This post has 3 feedbacks awaiting moderation...
Leave a comment:
captsolo weblog
See also:
- My homepage (captsolo.net)
- @CaptSolo on Twitter
- FriendFeed profile
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
Search
Gallery
www.flickr.com
|
Categories
Archives
- June 2010 (1)
- October 2009 (1)
- March 2009 (2)
- February 2009 (4)
- January 2009 (2)
- December 2008 (2)
- November 2008 (5)
- October 2008 (10)
- August 2008 (1)
- July 2008 (4)
- June 2008 (1)
- May 2008 (5)
- More...
- more...

