Skip to content

Commit c583493

Browse files
committed
ENH: add statsmodels wheel
Also removes the statsmodels/pandas faking part of ci/install.sh by using a statsmodels wheel
1 parent fac7d1d commit c583493

File tree

6 files changed

+41
-15
lines changed

6 files changed

+41
-15
lines changed

ci/install.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,6 @@ if [ x"$FULL_DEPS" == x"true" ]; then
6262
echo "Installing FULL_DEPS"
6363
# for pytables gets the lib as well
6464
time sudo apt-get $APT_ARGS install libhdf5-serial-dev
65-
66-
# fool statsmodels into thinking pandas was already installed
67-
# so it won't refuse to install itself.
68-
69-
SITE_PKG_DIR=$VIRTUAL_ENV/lib/python$TRAVIS_PYTHON_VERSION/site-packages
70-
echo "Using SITE_PKG_DIR: $SITE_PKG_DIR"
71-
72-
mkdir $SITE_PKG_DIR/pandas
73-
touch $SITE_PKG_DIR/pandas/__init__.py
74-
echo "version='0.10.0-phony'" > $SITE_PKG_DIR/pandas/version.py
75-
time pip install $PIP_ARGS git+git://github.com/statsmodels/statsmodels@c9062e43b8a5f7385537ca95#egg=statsmodels
76-
77-
rm -Rf $SITE_PKG_DIR/pandas # scrub phoney pandas
7865
fi
7966

8067
# build pandas

ci/requirements-2.7.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ scikits.timeseries==0.91.3
1717
MySQL-python==1.2.4
1818
scipy==0.10.0
1919
beautifulsoup4==4.2.1
20+
statsmodels==0.5.0

ci/requirements-2.7_LOCALE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ html5lib==1.0b2
1515
lxml==3.2.1
1616
scipy==0.10.0
1717
beautifulsoup4==4.2.1
18+
statsmodels==0.5.0

ci/requirements-3.2.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ patsy==0.1.0
1212
lxml==3.2.1
1313
scipy==0.12.0
1414
beautifulsoup4==4.2.1
15+
statsmodels==0.4.3

ci/requirements-3.3.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ patsy==0.1.0
1313
lxml==3.2.1
1414
scipy==0.12.0
1515
beautifulsoup4==4.2.1
16+
statsmodels==0.4.3

ci/speedpack/build.sh

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,42 @@ apt-get build-dep python-lxml -y
2626
export PYTHONIOENCODING='utf-8'
2727
export VIRTUALENV_DISTRIBUTE=0
2828

29+
30+
function create_fake_pandas() {
31+
local site_pkg_dir="$1"
32+
rm -rf $site_pkg_dir/pandas
33+
mkdir $site_pkg_dir/pandas
34+
touch $site_pkg_dir/pandas/__init__.py
35+
echo "version = '0.10.0-phony'" > $site_pkg_dir/pandas/version.py
36+
}
37+
38+
39+
function get_site_pkgs_dir() {
40+
python$1 -c 'import distutils; print(distutils.sysconfig.get_python_lib())'
41+
}
42+
43+
44+
function create_wheel() {
45+
local pip_args="$1"
46+
local wheelhouse="$2"
47+
local n="$3"
48+
local pyver="$4"
49+
50+
local site_pkgs_dir="$(get_site_pkgs_dir $pyver)"
51+
52+
53+
if [[ "$n" == *statsmodels* ]]; then
54+
create_fake_pandas $site_pkgs_dir && \
55+
pip wheel $pip_args --wheel-dir=$wheelhouse $n && \
56+
pip install $pip_args --no-index $n && \
57+
rm -Rf $site_pkgs_dir
58+
else
59+
pip wheel $pip_args --wheel-dir=$wheelhouse $n
60+
pip install $pip_args --no-index $n
61+
fi
62+
}
63+
64+
2965
function generate_wheels() {
3066
# get the requirements file
3167
local reqfile="$1"
@@ -62,8 +98,7 @@ function generate_wheels() {
6298

6399
# install and build the wheels
64100
cat $reqfile | while read N; do
65-
pip wheel $PIP_ARGS --wheel-dir=$WHEELHOUSE $N
66-
pip install $PIP_ARGS --no-index $N
101+
create_wheel "$PIP_ARGS" "$WHEELHOUSE" "$N" "$PY_VER"
67102
done
68103
}
69104

0 commit comments

Comments
 (0)