44# The behavior of the script is controlled by environment variabled defined
55# in the .travis.yml in the top level folder of the project.
66
7- # set -e
8-
9- # Check if we are running Python 2 or 3. This is needed for the apt-get package names
10- if [[ $TRAVIS_PYTHON_VERSION == ' 3.2' ]]; then
11- export PYTHON_SUFFIX=" 3" ;
12- fi
13-
14- # add repositories for gcc 4.8 and clang $CLANG_VERSION (set in .travis.yml)
15- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
16- sudo add-apt-repository --yes ' deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
17- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
18- # Needed because sometimes travis' repositories get out of date
19- time sudo apt-get update -qq
20-
21- # Install the dependencies we need
22- time sudo apt-get -qq install clang-${CLANG_VERSION} libclang-${CLANG_VERSION} -dev gcc-4.8 g++-4.8
23- time sudo apt-get install -qq python${PYTHON_SUFFIX} -numpy python${PYTHON_SUFFIX} -sphinx python${PYTHON_SUFFIX} -nose python${PYTHON_SUFFIX} -pip cython${PYTHON_SUFFIX}
24- # matplotlib and PyTables are not available for Python 3 as packages from the main repo yet.
25- if [[ $TRAVIS_PYTHON_VERSION == ' 2.7' ]]; then
26- time sudo apt-get install -qq python-matplotlib python-tables;
27- fi
7+ set -e
288
299# Install a ROOT binary that we custom-built in a 64-bit Ubuntu VM
3010# for the correct python / ROOT version
@@ -38,38 +18,16 @@ source root/bin/thisroot.sh
3818root -l -q
3919python -c " import ROOT; ROOT.TBrowser()"
4020
41- # setup newer compilers for ROOT 6
42- if [[ $ROOT == ' 6-00-00' ]]; then
43- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50;
44- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50;
45- sudo update-alternatives --set gcc /usr/bin/gcc-4.8; sudo update-alternatives --set g++ /usr/bin/g++-4.8;
46- fi
47-
48- # setup vpython with all packages
49- # being standalone.sh
5021# DailyPythonTools location
5122export base=` pwd`
5223
24+ # setup vpython with all packages
5325# package list from FinalStateAnalysis
5426# (https://github.com/uwcms/FinalStateAnalysis/blob/master/recipe/install_python.sh)
55- echo " Installing yolk"
56- time sudo pip install -U yolk
57- echo " Installing ipython"
58- time sudo pip install -U ipython
59- echo " Installing termcolor"
60- time sudo pip install -U termcolor
6127echo " Installing uncertainties <-- awesome error propagation"
62- time sudo pip install -U uncertainties
63- echo " Install progressbar"
64- time sudo pip install -U progressbar
65- echo " Installing argparse"
66- time sudo pip install -U argparse
67- echo " Installing pudb <-- interactive debugging"
68- time sudo pip install -U pudb
69- echo " Installing dateutil"
70- time sudo pip install python-dateutil
71- echo " Installing PrettyTable"
72- time sudo pip install PrettyTable
28+ time pip install -U uncertainties
29+ echo " Installing tabulate (latex table printing, etc)"
30+ pip install tabulate
7331
7432echo " Installing rootpy"
7533time pip install --user -e $base /external/rootpy
@@ -82,7 +40,8 @@ if [ ! -d "$base/external/lib" ]; then
8240 mkdir $base /external/lib
8341 echo " Building RooUnfold"
8442 cd $base /external/RooUnfold/
85- make -j4
43+ cmake CMakeLists.txt
44+ make
8645 # remove tmp folder
8746 rm -fr $base /external/RooUnfold/tmp
8847 mv $base /external/RooUnfold/libRooUnfold.so $base /external/lib/.
@@ -92,7 +51,7 @@ if [ ! -d "$base/external/lib" ]; then
9251
9352 echo " Building TopAnalysis"
9453 cd $base /external/TopAnalysis/
95- make -j4
54+ make
9655 # remove tmp folder
9756 rm -fr $base /external/TopAnalysis/tmp
9857 mv $base /external/TopAnalysis/libTopSVDUnfold.so $base /external/lib/.
10261
10362cd $base
10463export PATH=$PATH :$base /bin
105- # end standalone.sh
64+
10665# add base path from setup_standalone to PYTHONPATH
10766export PYTHONPATH=$PYTHONPATH :$base
0 commit comments