update build environment

parent e9977bab
......@@ -7,35 +7,43 @@ if [ "X${OPTS}" == "X" ]; then
exit
fi
# patch dune-grid-glue
./bin/build_external_libraries.py
# define environment in case we are not in one of our dockers
# determines which one to use below environments/
if [ "X${DXT_ENVIRONMENT}" == "X" ]; then
export DXT_ENVIRONMENT=debian-full
fi
# load the variables of this environment
# initialize the virtualenv, if not yet present
export BASEDIR="${PWD}"
mkdir -p e/${DXT_ENVIRONMENT}/venv && \
[ -e e/${DXT_ENVIRONMENT}/venv/dune ] || \
cd e/${DXT_ENVIRONMENT}/venv && \
virtualenv --python=python3 dune
cd "${BASEDIR}"
unset BASEDIR
# load the variables of this environment, sources the virtualenv
source e/${DXT_ENVIRONMENT}/PATH.sh
# install python dependencies into the virtualenv
pip install --upgrade pip
pip install $(grep Cython requirements.txt)
pip install -r requirements.txt
cd "${BASEDIR}"
cd pymor && pip install -e .
cd "${BASEDIR}"
# build dune
NPROC=$(($(nproc) - 1))
./dune-common/bin/dunecontrol --opts=config.opts/$OPTS --builddir=$INSTALL_PREFIX/build-$OPTS configure
./dune-common/bin/dunecontrol --opts=config.opts/$OPTS --builddir=$INSTALL_PREFIX/build-$OPTS bexec 'make -j$NPROC all'
./dune-common/bin/dunecontrol --opts=config.opts/$OPTS --builddir=$INSTALL_PREFIX/build-$OPTS bexec 'make -j$NPROC bindings || echo no bindings'
# our link to run-in-dune env in e/${DXT_ENVIRONMENT}/bin
# points to e/${DXT_ENVIRONMENT}/build/dune-common/run-in-dune-env
cd $INSTALL_PREFIX
[ -L build ] && rm build
ln -s build-$OPTS build
cd $BASEDIR
# install python dependencies
run-in-dune-env pip install -r requirements.txt
cd pymor && run-in-dune-env pip install -e .
echo
echo "All done! From now on run"
echo " export OPTS=$OPTS"
echo " source e/${DXT_ENVIRONMENT}/PATH.sh"
echo "to have the virtualenv available via"
echo " run-in-dune-env"
echo "to activate the virtualenv!"
......@@ -4,6 +4,13 @@ export INSTALL_PREFIX=${DIR}
export PATH=${INSTALL_PREFIX}/bin:$PATH
export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib64:${INSTALL_PREFIX}/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=${INSTALL_PREFIX}/lib64/pkgconfig:${INSTALL_PREFIX}/lib/pkgconfig:${INSTALL_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_EXECUTABLE=python3 -DDUNE_PYTHON_VIRTUALENV_SETUP=TRUE -DDUNE_PYTHON_ALLOW_GET_PIP=TRUE"
export CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_EXECUTABLE=python3 -DDUNE_PYTHON_VIRTUALENV_SETUP=FALSE -DDUNE_PYTHON_ALLOW_GET_PIP=FALSE"
export SIMDB_GIT_REPOS=$BASEDIR
export SIMDB_PATH=${BASEDIR}/DATA
# export PIP_DOWNLOAD_CACHE="${DIR}/pip-cache"
echo "${DIR}/venv/dune/bin/activate"
if [ -e "${DIR}/venv/dune/bin/activate" ]; then
source "${DIR}/venv/dune/bin/activate"
else
echo "WARNING: missing virtualenv, did you call build-dune.sh?"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment