Skip to content

Commit

Permalink
Reorganise some package structure, and move installer to use setuptoo…
Browse files Browse the repository at this point in the history
…ls (with implicit dependencies)
  • Loading branch information
cnorthwood committed Nov 12, 2010
1 parent 24a5c41 commit 46debaf
Show file tree
Hide file tree
Showing 13 changed files with 434 additions and 124 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
*.DS_Store
build/
docs/build/
local/
local/
molly.egg-info/
dist/
96 changes: 70 additions & 26 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,83 @@ Debian packages or their equivalents for your distribution or OS:
* libldap2-dev
* libsasl2-dev

postgis python-gdal proj libgeos-3.0.0 binutils libgdal1-1.5.0 postgresql-8.3 postgresql-8.3-postgis postgresql-server-dev-8.3 python-virtualenv python-setuptools python-dev libxslt-dev libldap2-dev libsasl2-dev

Unfortunately, pip isn't yet in Debian stable, so you'll need to install it
using easy_install:

$ aptitude install python-setuptools
$ easy_install pip

Next, set up and activate a virtualenv. This has been automated as
scripts/install_virtualenv.py. If you want to do this by hand, do the following:

$ virtualenv --no-site-packages ~/mollyenv
$ cd ~/mollyenv
$ source bin/activate

Next, clone the git repository to a temporary directory:

$ git clone git://mollyproject.git.sourceforge.net/gitroot/mollyproject/mollyproject

Install the Molly dependencies and Molly itself:

$ cd ~/mollyenv/mollyproject/branches/extracting_oxford/molly/
$ pip -E ~/mollyenv/ install `cat requirements/core.txt` --upgrade
$ python setup.py install
On Fedora, this list is:

Once you've set up the database as below, you'll be able to run the development
server as follows:
* python-virtualenv
* python-pip
* libxml-devel
* libxslt-devel
* python-devel
* postgresql-devel
* openldap-devel
* openssl-devel
* postgis
* gdal-python
* proj
* postgresql-server
* geos
* httpd
* libjpeg-devel

Next, you'll want to deploy Molly, this can be done in the usual way. This uses
setuptools to install all your dependencies. If you just want to play with
Molly, then it may make more sense to set up a virtualenv[1] and install Molly
into that.

Unfortunately, one of the dependencies on PyPI is actually broken - you will
need to install a fixed version from http://github.com/alexdutton/PyZ3950/
BEFORE running the setup script, otherwise the broken version will get
installed:

$ pip install git+http://github.com/alexdutton/PyZ3950.git

$ python setup.py install

If you don't have network access, you will need to install the following Python
packages manually (from PyPI unless otherwise listed):

* Levenshtein (SVN at http://pylevenshtein.googlecode.com/svn/trunk)
* pywurfl
* ply
* feedparser
* simplejson
* rdflib
* pytz
* python-dateutil
* Django
* oauth (version 1.0.1)
* psycopg2
* PIL
* lxml
* python-ldap
* django-compress
* python-memcached
* django-staticfiles

You'll then need to set up the database as below, and configure a deployment
of Molly. A simple deployment is provided in demo/. You'll need to give
settings.py a once over, and then build the media for the site:

$ python manage.py build_static --noinput
$ python manage.py synccompress
$ python manage.py generate_markers

You will also need to set up the cron jobs required for batch processing to
work. If you don't have a crontab at present, simply running:

$ PYTHONPATH=.. python manage.py create_crontab | crontab

will do the job, if not, don't pipe it to crontab and then add the required
lines by hand. Once this is done, you can finally start a test server.

$ cd ~/mollyenv/mollyproject/branches/extracting_oxford/molly/demos/molly_oxford
$ python manage.py runserver



Database
--------

Expand All @@ -74,8 +118,7 @@ Once this is done, you should create the molly database as a DB superuser

As a DB superuser, create the molly user:


(Make sure the password is the one given in settings.py in the demos folder)
(Make sure the password is the one given in settings.py in the demo folder)

$ createuser molly -P
Enter password for new role:
Expand Down Expand Up @@ -118,7 +161,8 @@ database:

It should ask you to create a new superuser. Say yes and set one up.

The site also requires a cache directory, currently /var/cache/molly .
The site also requires a cache directory, currently /var/cache/molly.
Create this directory and give user www-data and/or your developer users/group
all permissions to do things to it.

[1] http://pypi.python.org/pypi/virtualenv
Empty file removed __init__.py
Empty file.
Loading

0 comments on commit 46debaf

Please sign in to comment.