blob: 2f941f00b3ed5dcf2ccfa8b49401d3e70508e59b (
plain) (
blame)
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
|
#!/bin/bash
set -e
set -x
name="scipy"
version="1.1.0"
tarball="v${version}.tar.gz"
dest="${name}-${version}" # Ugh.
url="http://github.com/scipy/scipy/archive/${tarball}"
export PATH_OLD="${PATH}"
if [[ ! $1 ]]; then
echo No argument passed. Need a version.
exit 1
fi
export py_dest="/opt/$1/bin"
function pre()
{
export PATH="${py_dest}:${PATH_OLD}"
export OPENBLAS="/opt/OpenBLAS"
export PKG_CONFIG_PATH="${OPENBLAS}/lib/pkgconfig:${PKG_CONFIG_PATH}"
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
|