-
Notifications
You must be signed in to change notification settings - Fork 38
Installation instructions
PEER depends on a small number of freely downloadable pieces of software:
- CMake 2.8 or later
- R 2.10 or later (optional: needed for building the R package)
- Python 2.5 or later (optional: needed for building the Python package)
- scipy
- numpy
- SWIG 2.0 or later
PEER is built using the CMake build system. To build and install PEER from source, first pull it from our git source code repository:
git clone [email protected]:PMBio/peer.git
Then create a target directory for the build:
cd peer
mkdir build
Then go to the build directory and call CMake
cd build
cmake ./..
Finally, compile and install PEER
make
make install
We have prepared prebuilt PEER R packages for some common platforms:
To install the PEER R package using one of the above binary packages, simply download the package for the correct platform, for instance peer_osx_64_1.0.tgz, then run R CMD INSTALL peer_osx_64_1.0.tgz
.
To build the R package, you need to pass an additional argument to CMake: -DBUILD_R_PACKAGE=1
. The full sequence of build commands needed is then as follows:
mkdir build
cd build
cmake ./..
cmake -DBUILD_R_PACKAGE=1 ./..
make
make install
NOTE! You need SWIG 2.0 or later to build the R package. Building will fail with earlier SWIG versions. At the time of writing SWIG 1.x is still the one made available by default on many Linux distributions, so be sure to check the version.
By default, peer is not built as an universal binary on OS X. This can be easily changed by adding the following configuration parameter to CMake: -DBUILD_UNIVERSAL=1
. This will cause peer to be built as an Intel 32/64 bit binary. For more control over the included architectures, edit the file CMakeLists.txt in the root directory of the project.
- Installing peer binaries. If
make
is called with theinstall
flag, the standard behaviour is to install a peer binary and the peer C++ library to the system-wide targets. Usecmake ./.. -DCMAKE_INSTALL_PREFIX=~/my_software/peer
or equivalent to specify your own build target. - Python module. The python module is not affected by
CMAKE_INSTALL_PREFIX
. Instead, cmake tries to build the python module and installs it using the python version which is in the path when using the commandpython
. You can specify your own python binary by editingCMakeLists.txt
. The python interface requires a recent numpy version. - R module. TODO: Matias