diff --git a/INSTALL.md b/INSTALL.md index 31e3ab1a9..70eb720bd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,8 +4,18 @@ Mapnik is cross platform and runs on Linux, Mac OSX, Solaris, *BSD, and Windows. To configure and build Mapnik do: - ./configure - make +```bash + $ ./configure + $ make +``` + +To use a Python interpreter that is not named `python` for your build, do +something like the following instead: + +```bash + $ PYTHON=python2 ./configure + $ make PYTHON=python2 +``` NOTE: the above will not work on windows, rather see https://github.com/mapnik/mapnik/wiki/WindowsInstallation diff --git a/Makefile b/Makefile index 77fcef795..08b31ebac 100755 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ endif OS:=$(shell uname -s) +PYTHON = python + ifeq ($(JOBS),) JOBS:=1 ifeq ($(OS),Linux) @@ -20,13 +22,13 @@ endif all: mapnik install: - python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 install + $(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 install mapnik: - python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 + $(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 clean: - @python scons/scons.py -j$(JOBS) -c --config=cache --implicit-cache --max-drift=1 + @$(PYTHON) scons/scons.py -j$(JOBS) -c --config=cache --implicit-cache --max-drift=1 @if test -e ".sconsign.dblite"; then rm ".sconsign.dblite"; fi @if test -e "config.log"; then rm "config.log"; fi @if test -e ".sconf_temp/"; then rm -r ".sconf_temp/"; fi @@ -46,7 +48,7 @@ rebuild: make uninstall && make clean && time make && make install uninstall: - @python scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall + @$(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall test: @ ./run_tests diff --git a/configure b/configure index d609ba421..b468f8587 100755 --- a/configure +++ b/configure @@ -1,3 +1,5 @@ #!/bin/sh -python scons/scons.py --implicit-deps-changed configure "$@" +PYTHON=${PYTHON:-python} + +$PYTHON scons/scons.py --implicit-deps-changed configure "$@" diff --git a/run_tests b/run_tests index ccb045123..43763317c 100755 --- a/run_tests +++ b/run_tests @@ -2,8 +2,10 @@ failures=0 +PYTHON=${PYTHON:-python} + echo "*** Running visual tests..." -python tests/visual_tests/test.py -q +$PYTHON tests/visual_tests/test.py -q failures=$((failures+$?)) echo "*** Running C++ tests..." @@ -15,7 +17,7 @@ done echo echo "*** Running python tests..." -python tests/run_tests.py -q +$PYTHON tests/run_tests.py -q failures=$((failures+$?)) exit $failures