forked from fonnesbeck/ScipySuperpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_superpack.sh
executable file
·109 lines (97 loc) · 3.21 KB
/
install_superpack.sh
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh
PYTHON='/usr/bin/python'
GIT_FILENAME='git-1.7.7.3-intel-universal-snow-leopard'
GIT_VOLUME='/Volumes/Git 1.7.7.3 Snow Leopard Intel Universal/'
GFORTRAN='gcc-42-5666.3-darwin11.pkg'
SUDO='sudo'
BRANCH='master'
if [ -z "$VIRTUAL_ENV" ]; then
# Standard Python env
PYTHON=/usr/bin/python
SUDO=${SUDO}
else
# Virtualenv
PYTHON=python
SUDO="" #${SUDO} is not required in a virtualenv
fi
if [ -d ".git" ]; then
SUPERPACK_PATH='.'
else
SUPERPACK_PATH='ScipySuperpack'
hash git &> /dev/null
if [ $? -eq 1 ]; then
hash brew &> /dev/null
if [ $? -eq 1 ]; then
echo 'Downloading Git for OS X ...'
curl -o ${GIT_FILENAME}.dmg http://git-osx-installer.googlecode.com/files/${GIT_FILENAME}.dmg
echo 'Installing Git ...'
hdiutil mount ${GIT_FILENAME}.dmg
${SUDO} installer -pkg "${GIT_VOLUME}${GIT_FILENAME}.pkg" -target '/'
hdiutil unmount "${GIT_VOLUME}"
echo 'Cleaning up'
rm ${GIT_FILENAME}.dmg
echo 'Cloning Scipy Superpack'
/usr/local/git/bin/git clone --depth=1 git://github.com/fonnesbeck/ScipySuperpack.git
else
brew install git
echo 'Cloning Scipy Superpack'
git clone --depth=1 git://github.com/fonnesbeck/ScipySuperpack.git
fi
else
echo 'Cloning Scipy Superpack'
git clone --depth=1 git://github.com/fonnesbeck/ScipySuperpack.git
fi
cd ${SUPERPACK_PATH}
git checkout "${BRANCH}"
cd ..
fi
hash brew &> /dev/null
if [ $? -eq 1 ]; then
echo 'Downloading gFortran ...'
curl -o ${GFORTRAN} http://r.research.att.com/tools/${GFORTRAN}
echo 'Installing gFortran ...'
${SUDO} installer -pkg ${GFORTRAN} -target '/'
else
brew install gfortran
fi
hash easy_install &> /dev/null
if [ $? -eq 1 ]; then
echo 'Downloading ez_setup ...'
curl -o ez_setup.py http://peak.telecommunity.com/dist/ez_setup.py
echo 'Installing ez_setup ...'
${SUDO} "${PYTHON}" ez_setup.py
rm ez_setup.py
fi
echo 'Installing Scipy Superpack ...'
${SUDO} "${PYTHON}" -m easy_install -N -Z ${SUPERPACK_PATH}/*.egg
echo 'Installing readline ...'
${SUDO} "${PYTHON}" -m easy_install -N -Z readline
echo 'Installing nose ...'
${SUDO} "${PYTHON}" -m easy_install -N -Z nose
echo 'Installing six'
${SUDO} "${PYTHON}" -m easy_install -N -Z six
echo 'Installing pyparsing'
${SUDO} "${PYTHON}" -m easy_install -N -Z pyparsing==1.5.7
echo 'Installing python-dateutil'
${SUDO} "${PYTHON}" -m easy_install -N -Z python-dateutil
echo 'Installing pytz'
${SUDO} "${PYTHON}" -m easy_install -N -Z pytz
echo 'Installing Tornado'
${SUDO} "${PYTHON}" -m easy_install -N -Z tornado==3.1.1
echo 'Installing pyzmq'
${SUDO} "${PYTHON}" -m easy_install -N -Z pyzmq
echo 'Installing pika'
${SUDO} "${PYTHON}" -m easy_install -N -Z pika
echo 'Installing jinja2'
${SUDO} "${PYTHON}" -m easy_install jinja2
echo 'Installing patsy'
${SUDO} "${PYTHON}" -m easy_install -N -Z patsy
echo 'Installing pygments'
${SUDO} "${PYTHON}" -m easy_install -N -Z pygments
echo 'Installing sphinx'
${SUDO} "${PYTHON}" -m easy_install -N -Z sphinx
if [ ! -d ".git" ]; then
echo 'Cleaning up'
rm -rf ${SUPERPACK_PATH}
fi
echo 'Done'