Skip to content

Commit

Permalink
ENH: add statsmodels wheel
Browse files Browse the repository at this point in the history
Also removes the statsmodels/pandas faking part of ci/install.sh by using a
statsmodels wheel
  • Loading branch information
cpcloud committed Sep 25, 2013
1 parent fac7d1d commit c583493
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
13 changes: 0 additions & 13 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ if [ x"$FULL_DEPS" == x"true" ]; then
echo "Installing FULL_DEPS"
# for pytables gets the lib as well
time sudo apt-get $APT_ARGS install libhdf5-serial-dev

# fool statsmodels into thinking pandas was already installed
# so it won't refuse to install itself.

SITE_PKG_DIR=$VIRTUAL_ENV/lib/python$TRAVIS_PYTHON_VERSION/site-packages
echo "Using SITE_PKG_DIR: $SITE_PKG_DIR"

mkdir $SITE_PKG_DIR/pandas
touch $SITE_PKG_DIR/pandas/__init__.py
echo "version='0.10.0-phony'" > $SITE_PKG_DIR/pandas/version.py
time pip install $PIP_ARGS git+git://github.com/statsmodels/statsmodels@c9062e43b8a5f7385537ca95#egg=statsmodels

rm -Rf $SITE_PKG_DIR/pandas # scrub phoney pandas
fi

# build pandas
Expand Down
1 change: 1 addition & 0 deletions ci/requirements-2.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ scikits.timeseries==0.91.3
MySQL-python==1.2.4
scipy==0.10.0
beautifulsoup4==4.2.1
statsmodels==0.5.0
1 change: 1 addition & 0 deletions ci/requirements-2.7_LOCALE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ html5lib==1.0b2
lxml==3.2.1
scipy==0.10.0
beautifulsoup4==4.2.1
statsmodels==0.5.0
1 change: 1 addition & 0 deletions ci/requirements-3.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ patsy==0.1.0
lxml==3.2.1
scipy==0.12.0
beautifulsoup4==4.2.1
statsmodels==0.4.3
1 change: 1 addition & 0 deletions ci/requirements-3.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ patsy==0.1.0
lxml==3.2.1
scipy==0.12.0
beautifulsoup4==4.2.1
statsmodels==0.4.3
39 changes: 37 additions & 2 deletions ci/speedpack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,42 @@ apt-get build-dep python-lxml -y
export PYTHONIOENCODING='utf-8'
export VIRTUALENV_DISTRIBUTE=0


function create_fake_pandas() {
local site_pkg_dir="$1"
rm -rf $site_pkg_dir/pandas
mkdir $site_pkg_dir/pandas
touch $site_pkg_dir/pandas/__init__.py
echo "version = '0.10.0-phony'" > $site_pkg_dir/pandas/version.py
}


function get_site_pkgs_dir() {
python$1 -c 'import distutils; print(distutils.sysconfig.get_python_lib())'
}


function create_wheel() {
local pip_args="$1"
local wheelhouse="$2"
local n="$3"
local pyver="$4"

local site_pkgs_dir="$(get_site_pkgs_dir $pyver)"


if [[ "$n" == *statsmodels* ]]; then
create_fake_pandas $site_pkgs_dir && \
pip wheel $pip_args --wheel-dir=$wheelhouse $n && \
pip install $pip_args --no-index $n && \
rm -Rf $site_pkgs_dir
else
pip wheel $pip_args --wheel-dir=$wheelhouse $n
pip install $pip_args --no-index $n
fi
}


function generate_wheels() {
# get the requirements file
local reqfile="$1"
Expand Down Expand Up @@ -62,8 +98,7 @@ function generate_wheels() {

# install and build the wheels
cat $reqfile | while read N; do
pip wheel $PIP_ARGS --wheel-dir=$WHEELHOUSE $N
pip install $PIP_ARGS --no-index $N
create_wheel "$PIP_ARGS" "$WHEELHOUSE" "$N" "$PY_VER"
done
}

Expand Down

0 comments on commit c583493

Please sign in to comment.