language: python
python:
- 2.7

before_install:
- deactivate
- sudo add-apt-repository -y -r ppa:ubuntugis/ppa
- sudo add-apt-repository --yes ppa:mapnik/v2.2.0
- sudo apt-get update -qq
- sudo apt-get install postgresql-9.1-postgis
- sudo apt-get install postgis
- sudo apt-get install -y libmapnik mapnik-utils python-mapnik

install:
- virtualenv env
# add symbolic link for mapnik since it cannot be installed in virtualenv
- ln -s $(python -c 'import mapnik, os.path; print(os.path.dirname(mapnik.__file__))') ./env/lib/python2.7/site-packages
- source env/bin/activate
- python setup.py develop
- sudo service postgresql restart
- sudo -u postgres createuser www-data --no-superuser --no-createdb --no-createrole
- sudo -u postgres createdb -O www-data osmtm
- sudo -u postgres psql -d osmtm -c "CREATE EXTENSION postgis;"
- sudo -u postgres createdb -O www-data osmtm_tests
- sudo -u postgres psql -d osmtm_tests -c "CREATE EXTENSION postgis;"
- easy_install flake8

script:
- source env/bin/activate
- nosetests
- flake8 osmtm

after_success:
- pip install coveralls
- coveralls

language: python
python:
- 2.7

before_install:
- deactivate
- sudo add-apt-repository -y -r ppa:ubuntugis/ppa
- sudo add-apt-repository --yes ppa:mapnik/v2.2.0
- sudo apt-get update -qq
- sudo apt-get install postgresql-9.1-postgis
- sudo apt-get install postgis
- sudo apt-get install -y libmapnik mapnik-utils python-mapnik

install:
- virtualenv env
# add symbolic link for mapnik since it cannot be installed in virtualenv
- ln -s $(python -c 'import mapnik, os.path; print(os.path.dirname(mapnik.__file__))') ./env/lib/python2.7/site-packages
- source env/bin/activate
- python setup.py develop
- sudo service postgresql restart
- sudo -u postgres createuser www-data --no-superuser --no-createdb --no-createrole
- sudo -u postgres createdb -O www-data osmtm
- sudo -u postgres psql -d osmtm -c "CREATE EXTENSION postgis;"
- sudo -u postgres createdb -O www-data osmtm_tests
- sudo -u postgres psql -d osmtm_tests -c "CREATE EXTENSION postgis;"
- easy_install flake8

script:
- source env/bin/activate
- nosetests
- flake8 osmtm --exclude=osmtm/static

after_success:
- pip install coveralls
- coveralls

Exclude static directory for flake8. Avoids errors with bootstrap.
Exclude static directory for flake8. Avoids errors with bootstrap.
