Skip to content

Commit

Permalink
antok: Update INSTALL and add compile script.
Browse files Browse the repository at this point in the history
Update the INSTALL with some information on pytok. Also add a script to compile
the boost::python libraries (taken from rootpwa and slightly modified).
  • Loading branch information
legordian committed Apr 2, 2013
1 parent c30d605 commit 9875f2c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
10 changes: 8 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ Prerequisites
* Boost

While antok itself does not use the Boost libraries, the YAML prerequisite
(see below) needs it. Boost is available at http://www.boost.org. As Boost is
a header only library, nothing has to be compiled.
(see below) needs it. Boost is available at http://www.boost.org.

To use the python parts of antok as well as the bindings for some of antok's
functions, the boost::python library has to be compiled. This can be done
with the compileBoostPython.sh script in the antok directory. To use the
pytok module in python, add <repository root>/antok/build/pyLib to your
$PYTHONPATH environmental variable. It can then be imported in python in the
usual way, i.e. "import pytok".

* YAML

Expand Down
34 changes: 34 additions & 0 deletions compileBoostPython.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash


BOOST_ROOT_DIR=$(readlink --canonicalize ${BOOST_ROOT})
LOG_FILE=${BOOST_ROOT_DIR}/compileBoostLibs.log
if [[ -d ${BOOST_ROOT_DIR} ]]
then
echo ">>> compiling Boost.MPI library in '${BOOST_ROOT_DIR}'"
cd ${BOOST_ROOT_DIR}
else
echo "!!! error: '${BOOST_ROOT_DIR}' does not exist"
exit 1
fi


JAM_CONFIG_FILE="${BOOST_ROOT_DIR}/tools/build/v2/user-config.jam"
if [[ ! -e ${JAM_CONFIG_FILE} ]]
then
echo "!!! error: '${JAM_CONFIG_FILE}' does not exist"
exit 1
fi
LINE='using mpi ;'
if ! grep --quiet --line-regexp "${LINE}" ${JAM_CONFIG_FILE}
then
echo "${LINE}" >> ${JAM_CONFIG_FILE}
fi


echo " view result in ${LOG_FILE}"
./bootstrap.sh --with-libraries=python --prefix=. &> ${LOG_FILE}
./bjam >> ${LOG_FILE} 2>&1


exit 0

0 comments on commit 9875f2c

Please sign in to comment.