Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

OSX Install

tschaub edited this page Sep 28, 2011 · 5 revisions

Installing MapStory on OSX

Clone the repository

git clone [email protected]:opengeo/MapStory.git

Set up submodules

cd MapStory
git submodule update --init

Set up and activate the Python virtual environment

python bootstrap.py --no-site-packages
source bin/activate

Download the latest Psychopg, extract it, and alter the setup.cfg to look like the following:

[build_ext]
define=PSYCOPG_EXTENSIONS,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3

# Set to 1 to use Python datatime objects for default date/time representation.
use_pydatetime=1

# If the build system does not find the mx.DateTime headers, try 
# uncommenting the following line and setting its value to the right path.
#mx_include_dir=

# For Windows only:
# Set to 1 if the PostgreSQL library was built with OpenSSL.
# Required to link in OpenSSL libraries and dependencies.
have_ssl=0

# Statically link against the postgresql client library.
static_libpq=0

# "pg_config" is the preferred method to locate PostgreSQL headers and
# libraries needed to build psycopg2. If pg_config is not in the path or
# is installed under a different name uncomment the following option and
# set it to the pg_config full path.
pg_config=/usr/local/pgsql/bin/pg_config

# If postgresql is installed somewhere weird (i.e., not in your runtime library
# path like /usr/lib), just add the right path in "library_dirs" and any extra
# libraries required to link in "libraries".
library_dirs=/usr/local/pgsql/lib
libraries=/usr/lib

Install Psychopg in your MapStory Python virtual environment. Change into the extracted psychopg2 directory and run setup.py (make sure your MapStory virtual env is active):

cd path/to/psychopg2
python setup.py install

Start installing

cd path/to/MapStory
paver build

If this fails due to permissions errors trying to download django-avatar, edit the src/avatar/setup.py file to use the git url for django-avatar

url='git://github.com/ericflo/django-avatar.git',

The trick is, you have to edit this file while paver build is running. Good luck.

After successfully running paver build, you should be able to create a superuser and run GeoNode.

django-admin.py createsuperuser --settings=geonode.settings
paver host