summaryrefslogtreecommitdiff
path: root/build_cython.sh
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2018-08-29 13:04:12 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2018-08-29 13:04:12 -0400
commite1e50116a7151574f7ddfc05528bdf398e6f1566 (patch)
tree162a53ad2420651afe3e30ecdf7e57ee0f7cfbd5 /build_cython.sh
downloaddocker-buildsys-openblas-e1e50116a7151574f7ddfc05528bdf398e6f1566.tar.gz
Initial commit
Diffstat (limited to 'build_cython.sh')
-rwxr-xr-xbuild_cython.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/build_cython.sh b/build_cython.sh
new file mode 100755
index 0000000..995f556
--- /dev/null
+++ b/build_cython.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -e
+set -x
+
+version="0.28.5"
+tarball="${version}.tar.gz"
+dest="cython-${version}" # Ugh.
+url="http://github.com/cython/cython/archive/${tarball}"
+export PATH_OLD="${PATH}"
+
+if [[ ! $1 ]]; then
+ echo No argument passed. Need a version.
+ exit 1
+fi
+export pylon="/opt/$1/bin"
+
+function pre()
+{
+ export PATH="${pylon}:${PATH_OLD}"
+ export OPENBLAS_ROOT="/opt/OpenBLAS"
+ export PKG_CONFIG_PATH="${OPENBLAS_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}"
+ export LDFLAGS="-Wl,-rpath=${OPENBLAS_ROOT}/lib"
+
+ curl -LO "${url}"
+ tar xf "${tarball}"
+}
+
+function build()
+{
+ pre
+ pushd "${dest}"
+ python setup.py install
+ popd
+ post
+}
+
+function post()
+{
+ rm -rf "${dest}"
+ rm -rf "${tarball}"
+ echo "All done."
+}
+
+# Main
+build