... | ... | @@ -132,7 +132,9 @@ usable on other systems where the below requirements are met. |
|
|
- [ ] The [GTK+ 3](http://www.gtk.org/), [cairomm](http://cairographics.org/cairomm), [pycairo](http://cairographics.org/pycairo/) and [matplotlib](http://matplotlib.sourceforge.net/) libraries, used for graph drawing (optional).
|
|
|
- [ ] The [Graphviz](http://www.graphviz.org/) packaged for graph drawing, with the python bindings enabled (optional, deprecated).
|
|
|
|
|
|
Having installed the above dependencies, the module can be compiled in the usual way:
|
|
|
## Generic instructions
|
|
|
|
|
|
Having installed the above dependencies (which can be done either manually, or preferably via a package manager), the module can be compiled in the usual way:
|
|
|
|
|
|
```bash
|
|
|
$ ./configure
|
... | ... | @@ -143,9 +145,40 @@ After compilation, the module can be installed in the default Python module dire |
|
|
``` bash
|
|
|
$ make install
|
|
|
```
|
|
|
|
|
|
The above will install the library in the standard directories, and usually the final step requires root privileges.
|
|
|
|
|
|
Deviations from the standard directories will require that we inform the `configure` script in specific ways. This is done via configuration options or environment variables passed to the script. The most important ones are listed below:
|
|
|
|
|
|
### Options to the `configure` script
|
|
|
`--prefix=DIR`
|
|
|
: This sets the general installation prefix. If left unspecified, this defaults to `DIR=/usr/local`. Note that this is used to install only peripheral parts of the library, such as README and pkgconfig files. The location of the module itself is specified with the following option.
|
|
|
|
|
|
`--with-python-module-path=DIR`
|
|
|
: This sets the location where the Python module will be installed. If left unspecified, this will be automatically determined using the Python interpreter. The default values may be something like `DIR=/usr/lib/python3.6/site-packages`, but this varies between OSs, virtualenvs, etc.
|
|
|
|
|
|
`--with-boost-<libname>=NAME`
|
|
|
: The Boost libraries are installed with different names across OSs. The `configure` script tries to guess the names using common patterns, but this can fail. With this option, the user can specify the correct name (either the entire library name or just a suffix). For example, if the boost-python library is name `libboost-python-mt-gcc6-py36-foobar`, this can be passed to `configure` as `--with-boost-python=-mt-gcc6-py36-foobar`.
|
|
|
|
|
|
### Environment variables
|
|
|
The configure script will consult some shell environment variables that will affect its configuration.
|
|
|
|
|
|
`CXX`
|
|
|
: If defined, this variable should point to C++ compiler that should be used.
|
|
|
|
|
|
`PYTHON`
|
|
|
: If defined, this variable should point to the Python interpreter being used.
|
|
|
|
|
|
`CPPFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the C++ preprocessor (e.g. include flags of the form `-I/some/path`)
|
|
|
|
|
|
`CXXFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the C++ compiler (e.g. debugging and optimization options, `-O0 -g`)
|
|
|
|
|
|
`LDFLAGS`
|
|
|
: If defined, this variable will be used to pass extra flags to the shared object linker (e.g. paths to search for libraries, `-L/some/path`)
|
|
|
|
|
|
Below are some examples of using the above to achieve some common installation goals.
|
|
|
|
|
|
## Installing in a specific location (e.g. in a home directory)
|
|
|
|
|
|
The library can be installed in non-standard locations. For example, the usual convention of installing local programs in the `.local` subdirectory of a user's home can be achieved by:
|
... | ... | |