Skip to content

Commit 5f4a5b4

Browse files
committed
TST: clean up build testing
Author: Jeff Reback <[email protected]> Closes pandas-dev#15734 from jreback/build and squashes the following commits: a99b713 [Jeff Reback] suppress the import json warning when generating _version ed7c526 [Jeff Reback] modify install tests 1cc5b67 [Jeff Reback] TST: have the build test exercise pandas.test()
1 parent 59b88ab commit 5f4a5b4

5 files changed

+39
-46
lines changed

.travis.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ matrix:
3333
- PYTHON_VERSION=3.5
3434
- JOB_NAME: "35_osx"
3535
- TEST_ARGS="--skip-slow --skip-network"
36-
- BUILD_TYPE=conda
3736
- JOB_TAG=_OSX
3837
- TRAVIS_PYTHON_VERSION=3.5
3938
- CACHE_NAME="35_osx"
@@ -107,12 +106,12 @@ matrix:
107106
- python: 2.7
108107
env:
109108
- PYTHON_VERSION=2.7
110-
- JOB_NAME: "27_build_test_conda"
109+
- JOB_NAME: "27_build_test"
111110
- JOB_TAG=_BUILD_TEST
112111
- TEST_ARGS="--skip-slow"
113112
- FULL_DEPS=true
114113
- BUILD_TEST=true
115-
- CACHE_NAME="27_build_test_conda"
114+
- CACHE_NAME="27_build_test"
116115
- USE_CACHE=true
117116
# In allow_failures
118117
- python: 3.5
@@ -147,12 +146,12 @@ matrix:
147146
- python: 2.7
148147
env:
149148
- PYTHON_VERSION=2.7
150-
- JOB_NAME: "27_build_test_conda"
149+
- JOB_NAME: "27_build_test"
151150
- JOB_TAG=_BUILD_TEST
152151
- TEST_ARGS="--skip-slow"
153152
- FULL_DEPS=true
154153
- BUILD_TEST=true
155-
- CACHE_NAME="27_build_test_conda"
154+
- CACHE_NAME="27_build_test"
156155
- USE_CACHE=true
157156
- python: 3.5
158157
env:

ci/install_test.sh

-17
This file was deleted.

ci/install_travis.sh

+30-22
Original file line numberDiff line numberDiff line change
@@ -131,37 +131,45 @@ fi
131131

132132
if [ "$BUILD_TEST" ]; then
133133

134-
# build testing
135-
pip uninstall --yes cython
136-
pip install cython==0.23
137-
( python setup.py build_ext --inplace && python setup.py develop ) || true
134+
# build & install testing
135+
echo ["Starting installation test."]
136+
python setup.py clean
137+
python setup.py build_ext --inplace
138+
python setup.py sdist --formats=gztar
139+
conda uninstall cython
140+
pip install dist/*tar.gz || exit 1
138141

139142
else
140143

141144
# build but don't install
142145
echo "[build em]"
143146
time python setup.py build_ext --inplace || exit 1
144147

145-
# we may have run installations
146-
echo "[conda installs]"
147-
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.run"
148-
if [ -e ${REQ} ]; then
149-
time conda install -n pandas --file=${REQ} || exit 1
150-
fi
148+
fi
151149

152-
# we may have additional pip installs
153-
echo "[pip installs]"
154-
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.pip"
155-
if [ -e ${REQ} ]; then
156-
pip install -r $REQ
157-
fi
150+
# we may have run installations
151+
echo "[conda installs]"
152+
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.run"
153+
if [ -e ${REQ} ]; then
154+
time conda install -n pandas --file=${REQ} || exit 1
155+
fi
158156

159-
# may have addtl installation instructions for this build
160-
echo "[addtl installs]"
161-
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.sh"
162-
if [ -e ${REQ} ]; then
163-
time bash $REQ || exit 1
164-
fi
157+
# we may have additional pip installs
158+
echo "[pip installs]"
159+
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.pip"
160+
if [ -e ${REQ} ]; then
161+
pip install -r $REQ
162+
fi
163+
164+
# may have addtl installation instructions for this build
165+
echo "[addtl installs]"
166+
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.sh"
167+
if [ -e ${REQ} ]; then
168+
time bash $REQ || exit 1
169+
fi
170+
171+
# finish install if we are not doing a build-testk
172+
if [ -z "$BUILD_TEST" ]; then
165173

166174
# remove any installed pandas package
167175
# w/o removing anything else

ci/script_multi.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 429496
2424
echo PYTHONHASHSEED=$PYTHONHASHSEED
2525

2626
if [ "$BUILD_TEST" ]; then
27-
echo "We are not running pytest as this is simply a build test."
27+
cd /tmp
28+
python -c "import pandas; pandas.test(['-n 2'])"
2829
elif [ "$COVERAGE" ]; then
2930
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-append --cov-report xml:/tmp/cov.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas
3031
pytest -s -n 2 -m "not single" --cov=pandas --cov-append --cov-report xml:/tmp/cov.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas

versioneer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,9 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
11301130
# unpacked source archive. Distribution tarballs contain a pre-generated copy
11311131
# of this file.
11321132
1133-
import json
1133+
from warnings import catch_warnings
1134+
with catch_warnings(record=True):
1135+
import json
11341136
import sys
11351137
11361138
version_json = '''

0 commit comments

Comments
 (0)