Using couchdb in sagemath

For using couchdb you need to recompile the sagemath-python with ssl-support. This is quite easy:

This is the interesting part


   1 Now I had to modify the file Modules/Setup.dist in the Python source (mine was located in /usr/local/src/Python-2.6.1).  Change the following lines (highlighted in red).
   2 > vi Modules/Setup.dist
   3 ...
   4 
   5 206 # CSV file helper
   6 207 #_csv _csv.c
   7 208
   8 209 # Socket module helper for socket(2)
   9 210 _socket socketmodule.c
  10 211
  11 212 # Socket module helper for SSL support; you must comment out the other
  12 213 # socket line above, and possibly edit the SSL variable:
  13 214 #SSL=/usr/local/ssl
  14 215 _ssl _ssl.c \
  15 216     -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
  16 217     -L$(SSL)/lib -lssl -lcrypto
  17 218
  18 219 # The crypt module is now disabled by default because it breaks builds
  19 220 # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
  20 221 #
  21 222 # First, look at Setup.config; configure may have set this for you.
  22 223
  23 224 #crypt cryptmodule.c # -lcrypt  # crypt(3); needs -lcrypt on some systems 


== now you can install the couchdb python package ==;

The link for the current version you will find here: http://pypi.python.org/pypi/CouchDB

If you want to use a local couchdb-Server you will have to install it on your local machine. For debian/ubuntu do sudo apt-get install couchdb in a terminal.

For getting started: http://packages.python.org/CouchDB/index.html

couchdb (last edited 2011-09-11 07:29:10 by FrankPolte)