Installing MapFish Server from source
This page gives the steps to installing MapFish Server from source.
Before anything, if not already done, install the Python Environment as described here.
If you have checked out the trunk of MapFish and want to install MapFish Server from there then follow the procedure of the Trunk section. If you downloaded the code of a specific MapFish release then follow the procedure of the Release section.
The procedures detailed below assume your MapFish source tree located in /path/to/somewhere/MapFish/.
Trunk
MapFish
First, install the MapFish egg:
cd /path/to/somewhere/MapFish/server/python /path/to/somewhere/vpython/bin/python setup.py install
at this point, if you end up with this error:
NameError: global name 'log' is not defined
then you're hitting a bug in setuptools, follow the setuptools section and repeat the installation process of the MapFish egg.
psycopg2
Now install psycopg2:
/path/to/somewhere/vpython/bin/easy_install psycopg2
If that doesn't work (because the psycopg2 site is down), install the psycopg2 package of your distribution. On a Debian-based system, do the following as root:
apt-get install python-psycopg2
You can now jump to the ctypes section.
Release
MapFish
First, install the MapFish egg:
cd /path/to/somewhere/MapFish/server/python /path/to/somewhere/vpython/bin/python setup.py egg_info
at this point, if you end up with this error:
NameError: global name 'log' is not defined
then you're hitting a bug in setuptools, follow the setuptools section, then come back here and re-do the setup.py egg_info command before continuing the installation of MapFish egg.
The rest of the installation is:
/path/to/somewhere/vpython/bin/python setup.py bdist_egg easy_install -i http://dev.camptocamp.com/packages/mapfish/<x>.<y>/index dist/mapfish-<x>.<y>-py2.<z>.egg
Do not forget to replace x, y and z based on the release number of MapFish and the version of Python used.
You can now go to the ctypes section.
ctypes
The ctypes package is required. If you use Python 2.5, you can just ignore that section as ctypes is included in the Python 2.5 distribution. If you use Python 2.4 you need to install ctypes. Currently, because of a problem in the ctypes package itself, there's no way to easy_install it, so the only solution is to install the ctypes package provided with your operating system, on Debian-type systems:
apt-get install python-ctypes
setuptools
To work around the bug in setuptools, do the following operations:
cd /tmp svn co http://svn.python.org/projects/sandbox/branches/setuptools-0.6 setuptools cd setuptools /path/to/somewhere/vpython/bin/python setup.py install
