forked from jdswinbank/tkp-lofar-build
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_pyrap
More file actions
43 lines (32 loc) · 1.44 KB
/
build_pyrap
File metadata and controls
43 lines (32 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
####################################################################
startdir=`pwd`
BUILD_SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
source $BUILD_SCRIPTS_DIR/CONFIG
source $BUILD_SCRIPTS_DIR/utils.sh
####################################################################
echo "*** Building pyrap... ***"
cd $PYRAP_SVNROOT
SVN_REV=$(get_git_svnrev)
GIT_HASH=$(get_git_short_hash)
PYRAP_REV="${SVN_REV}_${GIT_HASH}"
BUILD_TARGET=$STABLE_SOFT_DIR/builds/pyrap/pyrap_r${PYRAP_REV}
mkdir -p $BUILD_TARGET
echo "Installing into $BUILD_TARGET"
# Use this if numpy is not available system-wide
# (or if you want a specific version)
NUMPY_VENV_INCLUDE_PATH=$HOME/code/tkp-dev/tkp/venv/lib/python2.7/site-packages/numpy/core/include
ln -sfnv $BUILD_TARGET $STABLE_SOFT_DIR/builds/pyrap/pyrap-latest
git clean -f
build_command="./batchbuild-trunk.py --prefix=$BUILD_TARGET \
--numpy-incdir=$NUMPY_VENV_INCLUDE_PATH \
--casacore-root=$(readlink ${STABLE_SOFT_DIR}/builds/casacore/casacore-latest ) \
--python-prefix=$BUILD_TARGET/pythonpackage install"
#--wcs-root=$WCSLIB_ROOT_DIR
echo "$build_command" > pyrap_build_command.sh
$build_command
check_result "pyrap" "batchbuild-trunk" $?
unpack_pth_file ${BUILD_TARGET}/pythonpackage/easy-install.pth ${BUILD_TARGET}/unpacked
##make .pth paths absolute, so we can symlink to it:
#sed -i "s@^./@${BUILD_TARGET}/pythonpackage/@g" \
# ${BUILD_TARGET}/pythonpackage/easy-install.pth