|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# This is a one-command cron job for setting up |
| 4 | +# a virtualenv-based, linux-based, py2-based environment |
| 5 | +# for building the Pandas documentation. |
| 6 | +# |
| 7 | +# The first run will install all required deps from pypi |
| 8 | +# into the venv including monsters like scipy. |
| 9 | +# You may want to set it up yourself to speed up the |
| 10 | +# process. |
| 11 | +# |
| 12 | +# This is meant to be run as a cron job under a dedicated |
| 13 | +# user account whose HOME directory contains this script. |
| 14 | +# a CI directory will be created under it and all files |
| 15 | +# stored within it. |
| 16 | +# |
| 17 | +# The hardcoded dep versions will gradually become obsolete |
| 18 | +# You may need to tweak them |
| 19 | +# |
| 20 | +# @y-p, Jan/2014 |
| 21 | + |
| 22 | +# disto latex is sometimes finicky. Optionall use |
| 23 | +# a local texlive install |
| 24 | +export PATH=/mnt/debian/texlive/2013/bin/x86_64-linux:$PATH |
| 25 | + |
| 26 | +# Having ccache will speed things up |
| 27 | +export PATH=/usr/lib64/ccache/:$PATH |
| 28 | + |
| 29 | +# limit disk usage |
| 30 | +ccache -M 200M |
| 31 | + |
| 32 | +BASEDIR="$HOME/CI" |
| 33 | +REPO_URL="https://github.com/pydata/pandas" |
| 34 | +REPO_LOC="$BASEDIR/pandas" |
| 35 | + |
| 36 | +if [ ! -d $BASEDIR ]; then |
| 37 | + mkdir -p $BASEDIR |
| 38 | + virtualenv $BASEDIR/venv |
| 39 | +fi |
| 40 | + |
| 41 | +source $BASEDIR/venv/bin/activate |
| 42 | + |
| 43 | +pip install numpy==1.7.2 |
| 44 | +pip install cython==0.20.0 |
| 45 | +pip install python-dateutil==2.2 |
| 46 | +pip install --pre pytz==2013.9 |
| 47 | +pip install sphinx==1.1.3 |
| 48 | +pip install numexpr==2.2.2 |
| 49 | + |
| 50 | +pip install matplotlib==1.3.0 |
| 51 | +pip install lxml==3.2.5 |
| 52 | +pip install beautifulsoup4==4.3.2 |
| 53 | +pip install html5lib==0.99 |
| 54 | + |
| 55 | +# You'll need R as well |
| 56 | +pip install rpy2==2.3.9 |
| 57 | + |
| 58 | +pip install tables==3.0.0 |
| 59 | +pip install bottleneck==0.7.0 |
| 60 | +pip install ipython==0.13.2 |
| 61 | + |
| 62 | +# only if you have too |
| 63 | +pip install scipy==0.13.2 |
| 64 | + |
| 65 | +pip install openpyxl==1.6.2 |
| 66 | +pip install xlrd==0.9.2 |
| 67 | +pip install xlwt==0.7.5 |
| 68 | +pip install xlsxwriter==0.5.1 |
| 69 | +pip install sqlalchemy==0.8.3 |
| 70 | + |
| 71 | +if [ ! -d "$REPO_LOC" ]; then |
| 72 | + git clone "$REPO_URL" "$REPO_LOC" |
| 73 | +fi |
| 74 | + |
| 75 | +cd "$REPO_LOC" |
| 76 | +git reset --hard |
| 77 | +git clean -df |
| 78 | +git checkout master |
| 79 | +git pull origin |
| 80 | +make |
| 81 | + |
| 82 | +source $BASEDIR/venv/bin/activate |
| 83 | +export PATH="/usr/lib64/ccache/:$PATH" |
| 84 | +pip uninstall pandas -yq |
| 85 | +pip install "$REPO_LOC" |
| 86 | + |
| 87 | +cd "$REPO_LOC"/doc |
| 88 | + |
| 89 | +python make.py clean |
| 90 | +python make.py html |
| 91 | +if [ ! $? == 0 ]; then |
| 92 | + exit 1 |
| 93 | +fi |
| 94 | +python make.py zip_html |
| 95 | +# usually requires manual intervention |
| 96 | +# python make.py latex |
| 97 | + |
| 98 | +# If you have access: |
| 99 | +# python make.py upload_dev |
0 commit comments