-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdo-build-numpy.sh
More file actions
executable file
·49 lines (36 loc) · 984 Bytes
/
do-build-numpy.sh
File metadata and controls
executable file
·49 lines (36 loc) · 984 Bytes
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
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
if [ -z "${BUILD_SETUP_READY}" ] ; then
. env-build-setup.sh
fi
if [ -z "${TGT}" ] ; then
echo "ERROR: TGT variable not set."
exit 1
fi
if [ ! -e ${TGT} ] ; then
echo "ERROR: target directory ${TGT} doesn't exist."
exit 1
fi
PKG="numpy"
PKG_URL="http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2.tar.gz/download"
PKG_FILENAME="numpy-1.6.2.tar.gz"
PKG_DIR="numpy-1.6.2"
cd ${TOP_BUILD_DIR}
if [ -e ${TOP_BUILD_DIR}/.built.${PKG} ] ; then
echo "${PKG} already built"
exit 0
fi
PKG_LOG_PFX="${LOG_PREFIX}${PKG}"
if [ ! -e $PKG_FILENAME ] ; then
wget --content-disposition $PKG_URL
fi
if [ -e $PKG_DIR ] ; then
rm -rf $PKG_DIR
fi
tar xfz $PKG_FILENAME
cd $PKG_DIR
${TARGET_PYTHON} setup.py build --fcompiler=gnu95 2>&1 | tee ${PKG_LOG_PFX}-build.log
${TARGET_PYTHON} setup.py install 2>&1 | tee ${PKG_LOG_PFX}-install.log
date "+%Y/%m/%d %H:%M:%S" > ${TOP_BUILD_DIR}/.built.${PKG}
cd ${TOP_BUILD_DIR}
echo "${PKG} built."