Skip to content

Commit 6708db0

Browse files
authored
use / test modern conda recipe (#18787)
1 parent b6a7cc9 commit 6708db0

13 files changed

+45
-21
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ matrix:
5151
- python-gtk2
5252
- dist: trusty
5353
env:
54-
- JOB="3.5" TEST_ARGS="--skip-slow --skip-network" COVERAGE=true
54+
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true COVERAGE=true
5555
- dist: trusty
5656
env:
5757
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true
@@ -62,7 +62,7 @@ matrix:
6262
# In allow_failures
6363
- dist: trusty
6464
env:
65-
- JOB="3.6_BUILD_TEST" TEST_ARGS="--skip-slow" BUILD_TEST=true
65+
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
6666
addons:
6767
apt:
6868
packages:
@@ -81,7 +81,7 @@ matrix:
8181
- JOB="2.7_SLOW" SLOW=true
8282
- dist: trusty
8383
env:
84-
- JOB="3.6_BUILD_TEST" TEST_ARGS="--skip-slow" BUILD_TEST=true
84+
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
8585
addons:
8686
apt:
8787
packages:

ci/install_travis.sh

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ conda config --set ssl_verify false || exit 1
5050
conda config --set quiet true --set always_yes true --set changeps1 false || exit 1
5151
conda update -q conda
5252

53+
if [ "$CONDA_BUILD_TEST" ]; then
54+
echo
55+
echo "[installing conda-build]"
56+
conda install conda-build
57+
fi
58+
59+
5360
echo
5461
echo "[add channels]"
5562
conda config --remove channels defaults || exit 1
@@ -116,7 +123,7 @@ if [ "$COVERAGE" ]; then
116123
fi
117124

118125
echo
119-
if [ -z "$BUILD_TEST" ]; then
126+
if [ -z "$PIP_BUILD_TEST" ] and [ -z "$CONDA_BUILD_TEST" ]; then
120127

121128
# build but don't install
122129
echo "[build em]"
@@ -155,23 +162,34 @@ echo "[removing installed pandas]"
155162
conda remove pandas -y --force
156163
pip uninstall -y pandas
157164

158-
if [ "$BUILD_TEST" ]; then
165+
echo
166+
echo "[no installed pandas]"
167+
conda list pandas
168+
pip list --format columns |grep pandas
159169

160-
# remove any installation
161-
pip uninstall -y pandas
162-
conda list pandas
163-
pip list --format columns |grep pandas
170+
# build and install
171+
echo
172+
173+
if [ "$PIP_BUILD_TEST" ]; then
164174

165175
# build & install testing
166-
echo ["building release"]
176+
echo "[building release]"
167177
bash scripts/build_dist_for_release.sh
168178
conda uninstall -y cython
169179
time pip install dist/*tar.gz || exit 1
170180

181+
elif [ "$CONDA_BUILD_TEST" ]; then
182+
183+
# build & install testing
184+
echo "[building conda recipe]"
185+
conda build ./conda.recipe --numpy 1.13 --python 3.5 -q --no-test
186+
187+
echo "[installing]"
188+
conda install $(conda build ./conda.recipe --numpy 1.13 --python 3.5 --output) --force
189+
171190
else
172191

173192
# install our pandas
174-
echo
175193
echo "[running setup.py develop]"
176194
python setup.py develop || exit 1
177195

ci/requirements-3.5.build renamed to ci/requirements-3.5_CONDA_BUILD_TEST.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ python=3.5*
22
python-dateutil
33
pytz
44
nomkl
5-
numpy=1.11.3
5+
numpy=1.13*
66
cython
File renamed without changes.

ci/requirements-3.5.run renamed to ci/requirements-3.5_CONDA_BUILD_TEST.run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pytz
2-
numpy=1.11.3
2+
numpy=1.13*
33
openpyxl
44
xlsxwriter
55
xlrd

ci/requirements-3.5.sh renamed to ci/requirements-3.5_CONDA_BUILD_TEST.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source activate pandas
44

5-
echo "install 35"
5+
echo "install 35 CONDA_BUILD_TEST"
66

77
# pip install python-dateutil to get latest
88
conda remove -n pandas python-dateutil --force

ci/requirements-3.6_BUILD_TEST.sh renamed to ci/requirements-3.6_PIP_BUILD_TEST.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source activate pandas
44

5-
echo "install 36 BUILD_TEST"
5+
echo "install 36 PIP_BUILD_TEST"
66

77
conda install -n pandas -c conda-forge pyarrow dask pyqt qtpy

ci/script_multi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fi
1818
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
1919
echo PYTHONHASHSEED=$PYTHONHASHSEED
2020

21-
if [ "$BUILD_TEST" ]; then
21+
if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
2222
echo "[build-test]"
2323

2424
echo "[env]"

ci/script_single.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ "$SLOW" ]; then
1616
TEST_ARGS="--only-slow --skip-network"
1717
fi
1818

19-
if [ "$BUILD_TEST" ]; then
19+
if [ "$PIP_BUILD_TEST" ] || [ "$CONDA_BUILD_TEST" ]; then
2020
echo "We are not running pytest as this is a build test."
2121

2222
elif [ "$DOC" ]; then

conda.recipe/meta.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package:
22
name: pandas
3-
version: {{ GIT_DESCRIBE_TAG|replace("v","") }}
3+
version: {{ environ.get('GIT_DESCRIBE_TAG','').replace('v', '', 1) }}
44

55
build:
6-
number: {{ GIT_DESCRIBE_NUMBER|int }}
6+
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
77
{% if GIT_DESCRIBE_NUMBER|int == 0 %}string: np{{ CONDA_NPY }}py{{ CONDA_PY }}_0
88
{% else %}string: np{{ CONDA_NPY }}py{{ CONDA_PY }}_{{ GIT_BUILD_STR }}{% endif %}
99

@@ -14,12 +14,14 @@ requirements:
1414
build:
1515
- python
1616
- cython
17-
- numpy x.x
17+
- {{ pin_compatible('numpy') }}
1818
- setuptools >=3.3
19+
- python-dateutil >=2.5.0
20+
- pytz
1921

2022
run:
2123
- python
22-
- numpy x.x
24+
- {{ pin_compatible('numpy') }}
2325
- python-dateutil >=2.5.0
2426
- pytz
2527

doc/source/whatsnew/v0.22.0.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ If installed, we now require:
162162
+-----------------+-----------------+----------+
163163

164164

165+
Build Changes
166+
^^^^^^^^^^^^^
167+
165168
- Building pandas for development now requires ``cython >= 0.24`` (:issue:`18613`)
166169
- Building from source now explicity requires ``setuptools`` in ``setup.py`` (:issue:`18113`)
170+
- Updated conda recipe to be in compliance with conda-build 3.0+ (:issue:`18002`)
167171

168172
.. _whatsnew_0220.api:
169173

0 commit comments

Comments
 (0)