Further touchup of INSTALL formatting to make the code snippets valid reST syntax
This commit is contained in:
parent
36360f98aa
commit
841ecbd420
1 changed files with 164 additions and 161 deletions
31
INSTALL
31
INSTALL
|
@ -6,18 +6,21 @@ INSTALLATION INSTRUCTIONS
|
|||
Quick Start
|
||||
-----------
|
||||
|
||||
Install needed dependencies
|
||||
Install needed dependencies::
|
||||
|
||||
$ sudo aptitude install libboost-filesystem-dev postgresql libgdal ...
|
||||
$ cd ~/src/mapnik
|
||||
|
||||
Build source code
|
||||
Build source code::
|
||||
|
||||
$ python scons/scons.py
|
||||
|
||||
Install mapnik libs and python bindings
|
||||
Install mapnik libs and python bindings::
|
||||
|
||||
$ sudo python scons/scons.py install
|
||||
|
||||
Run python interpreter and check installation
|
||||
$ python
|
||||
Run python interpreter and check installation::
|
||||
|
||||
>>> from mapnik import *
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
|
@ -73,7 +76,7 @@ Also, a minimum of 256MB of RAM is recommended for the build process.
|
|||
Building
|
||||
--------
|
||||
|
||||
Once you've installed the required software packages, the simplest way to build mapnik is to run "scons" (The software builder) without any options:
|
||||
Once you've installed the required software packages, the simplest way to build mapnik is to run "scons" (The software builder) without any options::
|
||||
|
||||
$ cd /path/to/mapnik-sourcecode
|
||||
$ /path/to/python scons/scons.py
|
||||
|
@ -84,11 +87,11 @@ Note that the python used to run "scons" does NOT have to be the same as the one
|
|||
|
||||
"scons" accepts a variety of options to customize your build. This allows you to specify which components are compiled, where to find dependencies, where to install mapnik, and so on.
|
||||
|
||||
To see the list of available options, from the root of the source distribution, run:
|
||||
To see the list of available options, from the root of the source distribution, run::
|
||||
|
||||
$ /path/to/python scons/scons.py -h
|
||||
|
||||
You will get:
|
||||
You will get::
|
||||
|
||||
CXX: The C++ compiler to use (defaults to g++).
|
||||
default: g++
|
||||
|
@ -209,11 +212,11 @@ XMLPARSER: Set xml parser (tinyxml|spirit|libxml2)
|
|||
|
||||
This help should be self-explanatory!
|
||||
|
||||
For example, if you compiled your own set of Boost libraries, you might use:
|
||||
For example, if you compiled your own set of Boost libraries, you might use::
|
||||
|
||||
$ /path/to/python scons/scons.py BOOST_INCLUDES=/usr/local/include/boost-1_33_1 BOOST_LIBS=/usr/local/lib
|
||||
|
||||
Or if you installed Postgres and Gdal from source and you'd like to build mapnik in Debug mode with the ability for XML parsing, you might use:
|
||||
Or if you installed Postgres and Gdal from source and you'd like to build mapnik in Debug mode with the ability for XML parsing, you might use::
|
||||
|
||||
$ /path/to/python scons/scons.py DEBUG=y PGSQL_INCLUDES=/usr/local/pgsql/include PGSQL_LIBS=/usr/local/pgsql/lib XMLPARSER=libxml2
|
||||
|
||||
|
@ -221,11 +224,11 @@ $ /path/to/python scons/scons.py DEBUG=y PGSQL_INCLUDES=/usr/local/pgsql/include
|
|||
Installation
|
||||
------------
|
||||
|
||||
Once the build has successfully completed, you can install the various files on your system by executing:
|
||||
Once the build has successfully completed, you can install the various files on your system by executing::
|
||||
|
||||
$ /path/to/python scons/scons.py install
|
||||
|
||||
By default, everything will be installed under the PREFIX '/usr/local' as such:
|
||||
By default, everything will be installed under the PREFIX '/usr/local' as such::
|
||||
|
||||
$PREFIX/lib: libmapnik.so
|
||||
$PREFIX/lib/mapnik/input: input plug-ins
|
||||
|
@ -241,7 +244,7 @@ Testing Installation
|
|||
|
||||
There currently is no easy way to test your setup, other than write some code to generate a map.
|
||||
|
||||
One simple thing you can do is try to load the Python module in a python interpreter, and make sure it does so without errors:
|
||||
One simple thing you can do is try to load the Python module in a python interpreter, and make sure it does so without errors::
|
||||
|
||||
$ /path/to/python
|
||||
Python 2.4.2 (#1, Jan 11 2006, 10:59:28)
|
||||
|
@ -265,7 +268,7 @@ A note on projection support
|
|||
Mapnik's core C++ library and map rendering engine support on-the-fly cartographic
|
||||
reprojections.
|
||||
|
||||
Here is an example on how to use it:
|
||||
Here is an example on how to use it::
|
||||
|
||||
>>> from mapnik import Projection, Coord
|
||||
>>> p = Projection('+init=epsg:27700') # British National Grid
|
||||
|
|
Loading…
Reference in a new issue