Skip to content

Commit 977034a

Browse files
committed
Merge pull request #7971 from cpcloud/conda
CI/WIP: Use conda for most deps
2 parents f8582e8 + 1ff4b36 commit 977034a

9 files changed

+215
-101
lines changed

.travis.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
language: python
33

44
env:
5+
56
global:
67
# scatterci API key
78
#- secure: "Bx5umgo6WjuGY+5XFa004xjCiX/vq0CyMZ/ETzcs7EIBI1BE/0fIDXOoWhoxbY9HPfdPGlDnDgB9nGqr5wArO2s+BavyKBWg6osZ3dmkfuJPMOWeyCa92EeP+sfKw8e5HSU5MizW9e319wHWOF/xkzdHR7T67Qd5erhv91x4DnQ="
@@ -19,38 +20,44 @@ matrix:
1920
- NOSE_ARGS="not slow and not network and not disabled"
2021
- CLIPBOARD=xclip
2122
- LOCALE_OVERRIDE="it_IT.UTF-8"
23+
- BUILD_TYPE=conda
2224
- JOB_NAME: "26_nslow_nnet"
2325
- python: 2.7
2426
env:
2527
- NOSE_ARGS="slow and not network and not disabled"
2628
- LOCALE_OVERRIDE="zh_CN.GB18030"
2729
- FULL_DEPS=true
2830
- JOB_TAG=_LOCALE
31+
- BUILD_TYPE=conda
2932
- JOB_NAME: "27_slow_nnet_LOCALE"
3033
- python: 2.7
3134
env:
3235
- NOSE_ARGS="not slow and not disabled"
3336
- FULL_DEPS=true
3437
- CLIPBOARD_GUI=gtk2
38+
- BUILD_TYPE=conda
3539
- JOB_NAME: "27_nslow"
3640
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
3741
- python: 3.3
3842
env:
3943
- NOSE_ARGS="not slow and not disabled"
4044
- FULL_DEPS=true
4145
- CLIPBOARD=xsel
46+
- BUILD_TYPE=conda
4247
- JOB_NAME: "33_nslow"
4348
- python: 3.4
4449
env:
4550
- NOSE_ARGS="not slow and not disabled"
4651
- FULL_DEPS=true
4752
- CLIPBOARD=xsel
53+
- BUILD_TYPE=conda
4854
- JOB_NAME: "34_nslow"
4955
- python: 3.2
5056
env:
5157
- NOSE_ARGS="not slow and not disabled"
5258
- FULL_DEPS=true
5359
- CLIPBOARD_GUI=qt4
60+
- BUILD_TYPE=pydata
5461
- JOB_NAME: "32_nslow"
5562
- python: 2.7
5663
env:
@@ -59,13 +66,15 @@ matrix:
5966
- JOB_NAME: "27_numpy_master"
6067
- JOB_TAG=_NUMPY_DEV_master
6168
- NUMPY_BUILD=master
69+
- BUILD_TYPE=pydata
6270
- PANDAS_TESTING_MODE="deprecate"
6371
allow_failures:
6472
- python: 3.2
6573
env:
6674
- NOSE_ARGS="not slow and not disabled"
6775
- FULL_DEPS=true
6876
- CLIPBOARD_GUI=qt4
77+
- BUILD_TYPE=pydata
6978
- JOB_NAME: "32_nslow"
7079
- python: 2.7
7180
env:
@@ -74,11 +83,14 @@ matrix:
7483
- JOB_NAME: "27_numpy_master"
7584
- JOB_TAG=_NUMPY_DEV_master
7685
- NUMPY_BUILD=master
86+
- BUILD_TYPE=pydata
7787
- PANDAS_TESTING_MODE="deprecate"
7888

7989
before_install:
8090
- echo "before_install"
8191
- echo $VIRTUAL_ENV
92+
- export PATH="$HOME/miniconda/bin:$PATH"
93+
- sudo apt-get install ccache
8294
- df -h
8395
- date
8496
- pwd
@@ -92,7 +104,7 @@ before_install:
92104
install:
93105
- echo "install"
94106
- ci/prep_ccache.sh
95-
- ci/install.sh
107+
- ci/install_${BUILD_TYPE}.sh
96108
- ci/submit_ccache.sh
97109

98110
before_script:
@@ -106,6 +118,6 @@ script:
106118

107119
after_script:
108120
- if [ -f /tmp/doc.log ]; then cat /tmp/doc.log; fi
109-
- ci/print_versions.py
121+
- source activate pandas && ci/print_versions.py
110122
- ci/print_skipped.py /tmp/nosetests.xml
111123
- ci/after_script.sh

ci/install_conda.sh

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
#!/bin/bash
2+
3+
# There are 2 distinct pieces that get zipped and cached
4+
# - The venv site-packages dir including the installed dependencies
5+
# - The pandas build artifacts, using the build cache support via
6+
# scripts/use_build_cache.py
7+
#
8+
# if the user opted in to use the cache and we're on a whitelisted fork
9+
# - if the server doesn't hold a cached version of venv/pandas build,
10+
# do things the slow way, and put the results on the cache server
11+
# for the next time.
12+
# - if the cache files are available, instal some necessaries via apt
13+
# (no compiling needed), then directly goto script and collect 200$.
14+
#
15+
16+
function edit_init()
17+
{
18+
if [ -n "$LOCALE_OVERRIDE" ]; then
19+
echo "Adding locale to the first line of pandas/__init__.py"
20+
rm -f pandas/__init__.pyc
21+
sedc="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LOCALE_OVERRIDE')\n"
22+
sed -i "$sedc" pandas/__init__.py
23+
echo "head -4 pandas/__init__.py"
24+
head -4 pandas/__init__.py
25+
echo
26+
fi
27+
}
28+
29+
edit_init
30+
31+
python_major_version="${TRAVIS_PYTHON_VERSION:0:1}"
32+
[ "$python_major_version" == "2" ] && python_major_version=""
33+
34+
home_dir=$(pwd)
35+
echo "home_dir: [$home_dir]"
36+
37+
if [ -n "$LOCALE_OVERRIDE" ]; then
38+
# make sure the locale is available
39+
# probably useless, since you would need to relogin
40+
time sudo locale-gen "$LOCALE_OVERRIDE"
41+
fi
42+
43+
# Need to enable for locale testing. The location of the locale file(s) is
44+
# distro specific. For example, on Arch Linux all of the locales are in a
45+
# commented file--/etc/locale.gen--that must be commented in to be used
46+
# whereas Ubuntu looks in /var/lib/locales/supported.d/* and generates locales
47+
# based on what's in the files in that folder
48+
time echo 'it_CH.UTF-8 UTF-8' | sudo tee -a /var/lib/locales/supported.d/it
49+
time sudo locale-gen
50+
51+
52+
# install gui for clipboard testing
53+
if [ -n "$CLIPBOARD_GUI" ]; then
54+
echo "Using CLIPBOARD_GUI: $CLIPBOARD_GUI"
55+
[ -n "$python_major_version" ] && py="py"
56+
python_cb_gui_pkg=python${python_major_version}-${py}${CLIPBOARD_GUI}
57+
time sudo apt-get $APT_ARGS install $python_cb_gui_pkg
58+
fi
59+
60+
61+
# install a clipboard if $CLIPBOARD is not empty
62+
if [ -n "$CLIPBOARD" ]; then
63+
echo "Using clipboard: $CLIPBOARD"
64+
time sudo apt-get $APT_ARGS install $CLIPBOARD
65+
fi
66+
67+
python_major_version="${TRAVIS_PYTHON_VERSION:0:1}"
68+
[ "$python_major_version" == "2" ] && python_major_version=""
69+
70+
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh || exit 1
71+
bash miniconda.sh -b -p $HOME/miniconda || exit 1
72+
73+
conda config --set always_yes yes --set changeps1 no || exit 1
74+
conda update -q conda || exit 1
75+
conda config --add channels http://conda.binstar.org/pandas || exit 1
76+
77+
# Useful for debugging any issues with conda
78+
conda info -a || exit 1
79+
80+
conda create -n pandas python=$TRAVIS_PYTHON_VERSION || exit 1
81+
conda install -n pandas --file=ci/requirements-${TRAVIS_PYTHON_VERSION}${JOB_TAG}.txt || exit 1
82+
83+
conda install -n pandas pip setuptools nose || exit 1
84+
conda remove -n pandas pandas
85+
86+
source activate pandas
87+
88+
# set the compiler cache to work
89+
if [ "$IRON_TOKEN" ]; then
90+
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
91+
gcc=$(which gcc)
92+
echo "gcc: $gcc"
93+
ccache=$(which ccache)
94+
echo "ccache: $ccache"
95+
export CC='ccache gcc'
96+
fi
97+
98+
python setup.py build_ext --inplace && python setup.py develop
99+
100+
for package in beautifulsoup4 'python-dateutil'; do
101+
pip uninstall --yes $package
102+
done
103+
104+
true

ci/install.sh renamed to ci/install_pydata.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,8 @@ if [ "$IRON_TOKEN" ]; then
137137
fi
138138

139139
# build pandas
140-
time python setup.py sdist
141-
pip uninstall cython -y
142-
143-
# install pandas
144-
time pip install $(find dist | grep gz | head -n 1)
140+
python setup.py build_ext --inplace
141+
python setup.py develop
145142

146143
# restore cython (if not numpy building)
147144
if [ -z "$NUMPY_BUILD" ]; then

ci/requirements-2.6.txt

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
numpy==1.7.0
2-
cython==0.19.1
3-
python-dateutil==1.5
4-
pytz==2013b
5-
http://www.crummy.com/software/BeautifulSoup/bs4/download/4.2/beautifulsoup4-4.2.0.tar.gz
6-
html5lib==1.0b2
7-
numexpr==1.4.2
8-
sqlalchemy==0.7.10
9-
pymysql==0.6.0
10-
psycopg2==2.5
11-
scipy==0.11.0
12-
statsmodels==0.4.3
13-
xlwt==0.7.5
14-
openpyxl==2.0.3
15-
xlsxwriter==0.4.6
16-
xlrd==0.9.2
1+
numpy=1.7.0
2+
cython=0.19.1
3+
dateutil=1.5
4+
pytz=2013b
5+
scipy=0.11.0
6+
xlwt=0.7.5
7+
xlrd=0.9.2
8+
openpyxl=2.0.3
9+
statsmodels=0.4.3
10+
html5lib=1.0b2
11+
beautiful-soup=4.2.0
12+
psycopg2=2.5.1
13+
numexpr=1.4.2
14+
pymysql=0.6.0
15+
sqlalchemy=0.7.8
16+
xlsxwriter=0.4.6

ci/requirements-2.7.txt

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
python-dateutil==2.1
2-
pytz==2013b
3-
xlwt==0.7.5
4-
numpy==1.8.1
5-
cython==0.19.1
6-
bottleneck==0.6.0
7-
numexpr==2.2.2
8-
tables==3.0.0
9-
matplotlib==1.3.1
10-
openpyxl==1.6.2
11-
xlsxwriter==0.4.6
12-
xlrd==0.9.2
13-
patsy==0.1.0
14-
sqlalchemy==0.9.6
15-
pymysql==0.6.1
16-
psycopg2==2.5.2
17-
html5lib==1.0b2
18-
lxml==3.2.1
19-
scipy==0.13.3
20-
beautifulsoup4==4.2.1
21-
statsmodels==0.5.0
22-
boto==2.26.1
23-
httplib2==0.8
24-
python-gflags==2.0
25-
google-api-python-client==1.2
1+
dateutil=2.1
2+
pytz=2013b
3+
xlwt=0.7.5
4+
numpy=1.7.0
5+
cython=0.19.1
6+
numexpr=2.2.2
7+
pytables=3.0.0
8+
matplotlib=1.3.1
9+
openpyxl=1.6.2
10+
xlrd=0.9.2
11+
sqlalchemy=0.9.6
12+
lxml=3.2.1
13+
scipy
14+
xlsxwriter=0.4.6
15+
statsmodels
16+
boto=2.26.1
17+
bottleneck=0.8.0
18+
psycopg2=2.5.2
19+
patsy
20+
pymysql=0.6.1
21+
html5lib=1.0b2
22+
beautiful-soup=4.2.1
23+
httplib2=0.8
24+
python-gflags=2.0
25+
google-api-python-client=1.2

ci/requirements-2.7_LOCALE.txt

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
python-dateutil
2-
pytz==2013b
3-
xlwt==0.7.5
4-
openpyxl==1.6.2
5-
xlsxwriter==0.4.6
6-
xlrd==0.9.2
7-
numpy==1.7.1
8-
cython==0.19.1
9-
bottleneck==0.6.0
10-
matplotlib==1.3.0
11-
patsy==0.1.0
12-
sqlalchemy==0.8.1
13-
html5lib==1.0b2
14-
lxml==3.2.1
15-
scipy==0.10.0
16-
beautifulsoup4==4.2.1
17-
statsmodels==0.4.3
18-
bigquery==2.0.17
1+
dateutil
2+
pytz=2013b
3+
xlwt=0.7.5
4+
openpyxl=1.6.2
5+
xlsxwriter=0.4.6
6+
xlrd=0.9.2
7+
numpy=1.7.1
8+
cython=0.19.1
9+
bottleneck=0.8.0
10+
matplotlib=1.3.0
11+
patsy=0.1.0
12+
sqlalchemy=0.8.1
13+
html5lib=1.0b2
14+
lxml=3.2.1
15+
scipy=0.11.0
16+
beautiful-soup=4.2.1
17+
statsmodels=0.4.3
18+
bigquery=2.0.17

ci/requirements-3.3.txt

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
python-dateutil==2.2
2-
pytz==2013b
3-
openpyxl==1.6.2
4-
xlsxwriter==0.4.6
5-
xlrd==0.9.2
6-
html5lib==1.0b2
7-
numpy==1.8.0
8-
cython==0.19.1
9-
numexpr==2.3
10-
tables==3.1.0
11-
bottleneck==0.8.0
12-
matplotlib==1.2.1
13-
patsy==0.1.0
14-
lxml==3.2.1
15-
scipy==0.13.3
16-
beautifulsoup4==4.2.1
17-
statsmodels==0.5.0
1+
dateutil
2+
pytz=2013b
3+
openpyxl=1.6.2
4+
xlsxwriter=0.4.6
5+
xlrd=0.9.2
6+
html5lib=1.0b2
7+
numpy=1.8.0
8+
cython=0.19.1
9+
numexpr
10+
pytables
11+
bottleneck=0.8.0
12+
matplotlib
13+
patsy
14+
lxml=3.2.1
15+
scipy
16+
beautiful-soup=4.2.1
17+
statsmodels

0 commit comments

Comments
 (0)