Apache DataFusion SQL Query Engine
ARROW-2844: [Packaging] Test OSX wheels after build
Krisztián Szűcs1104e6cc6039
diff --git a/dev/tasks/README.md b/dev/tasks/README.mdindex d7f0afabe0..9aaca1a0be 100644--- a/dev/tasks/README.md+++ b/dev/tasks/README.md@@ -60,6 +60,9 @@ submission. The tasks are defined in `tasks.yml`repository](https://help.github.com/articles/creating-a-new-repository)2. Enable [TravisCI](https://travis-ci.org/getting_started) and[Appveyor](https://www.appveyor.com/docs/) integrations on it++ - turn off Travis' [auto cancellation](https://docs.travis-ci.com/user/customizing-the-build/#Building-only-the-latest-commit) feature on branches+3. Clone the newly created, by default the scripts looks for `crossbow` next toarrow repository.@@ -77,7 +80,12 @@ submission. The tasks are defined in `tasks.yml`> or pass as an argument to the CLI script `--github-token`-6. Install the python dependencies for the script:+6. Install Python 3.6:++ Miniconda is preferred, see installation instructions:+ https://conda.io/docs/user-guide/install/index.html++7. Install the python dependencies for the script:```bashconda install -y jinja2 pygit2 click ruamel.yaml setuptools_scm github3.py python-gnupg@@ -88,7 +96,7 @@ submission. The tasks are defined in `tasks.yml`pip install jinja2 pygit2 click ruamel.yaml setuptools_scm github3.py python-gnupg```-7. Try running it:+8. Try running it:```bash$ python crossbow.py --help```diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.ymlindex 40436a6929..47e331f879 100644--- a/dev/tasks/conda-recipes/appveyor.yml+++ b/dev/tasks/conda-recipes/appveyor.yml@@ -17,6 +17,8 @@environment:ARROW_VERSION: {{ arrow.version }}+ # regardless of the python version we build against+ CONDA_INSTALL_LOCN: C:\Miniconda36-x64# We always use a 64-bit machine, but can build x86 distributions# with the TARGET_ARCH variable.@@ -28,7 +30,7 @@ install:- cmd: rmdir C:\cygwin /s /q# Add path, activate `conda` and update conda.- - cmd: call {{ conda_install_location }}\Scripts\activate.bat+ - cmd: call %CONDA_INSTALL_LOCN%\Scripts\activate.bat- cmd: conda.exe update --yes --quiet conda- cmd: set PYTHONUNBUFFERED=1diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.pyindex 0578e15b0b..604f57fb87 100755--- a/dev/tasks/crossbow.py+++ b/dev/tasks/crossbow.py@@ -65,7 +65,7 @@ class GitRemoteCallbacks(pygit2.RemoteCallbacks):return None-class Repo(object):+class Repo:"""Base class for interaction with local git repositoriesA high level wrapper used for both reading revision information from@@ -247,7 +247,7 @@ class Queue(Repo):content_type=content_type)-class Target(object):+class Target:"""Describes target repository and revision the builds run againstThis serializable data container holding information about arrow's@@ -273,7 +273,7 @@ class Target(object):version=version)-class Task(object):+class Task:"""Describes a build task and metadata required to render CI templatesA task is represented as a single git commit and branch containing jinja2@@ -318,7 +318,7 @@ class Task(object):return '.travis.yml'-class Job(object):+class Job:"""Describes multiple tasks against a single target repository"""def __init__(self, target, tasks):@@ -469,7 +469,7 @@ def status(ctx, job_name):job = queue.get(job_name)statuses = queue.github_statuses(job)- for task_name, task in job.tasks.items():+ for task_name, task in sorted(job.tasks.items()):status = statuses[task_name]assets = queue.github_assets(task)@@ -518,7 +518,7 @@ def sign(ctx, job_name, gpg_homedir, target_dir):click.echo('Download {}\'s artifacts to {}'.format(job_name, target_dir))tpl = '{:<10} {:>68}'- for task_name, task in job.tasks.items():+ for task_name, task in sorted(job.tasks.items()):assets = queue.github_assets(task)artifact_dir = target_dir / task_nameartifact_dir.mkdir(exist_ok=True)diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.shindex 7bb1db1e8a..6dce16f626 100755--- a/dev/tasks/python-wheels/osx-build.sh+++ b/dev/tasks/python-wheels/osx-build.sh@@ -19,6 +19,7 @@set -e+# overrides multibuild's default build_wheelfunction build_wheel {pip install -U pippip install setuptools_scm@@ -191,18 +192,39 @@ function build_wheel {--bundle-arrow-cpp --bundle-boost --boost-namespace=arrow_boost \bdist_wheells -l dist/+ popd++ popd+}++# overrides multibuild's default install_run+function install_run {+ multibuild_dir=`realpath $MULTIBUILD_DIR`++ pushd $1 # enter arrow's directory++ wheelhouse="$PWD/python/dist"- # Do a test installation of the built wheel and change into another- # directory to ensure our import tests later on pick up the wheel and- # not the binaries from the build directory.- for wheel in dist/*.whl; do- pip install "$wheel"- done- mkdir -p tmp- pushd tmp+ # Install test dependencies and built wheel+ if [ -n "$TEST_DEPENDS" ]; then+ pip install $(pip_opts) $TEST_DEPENDS+ fi+ # Install compatible wheel+ pip install $(pip_opts) \+ $(python $multibuild_dir/supported_wheels.py $wheelhouse/*.whl)++ # Runs tests on installed distribution from an empty directory+ python --version++ # Test optional dependenciespython -c "import pyarrow"+ python -c "import pyarrow.orc"python -c "import pyarrow.parquet"- popd- popd+ python -c "import pyarrow.plasma"++ # Run pyarrow tests+ pip install pytest pytest-faulthandler+ py.test --pyargs pyarrow+popd}diff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.ymlindex d8a107b4ae..fadc551581 100644--- a/dev/tasks/python-wheels/travis.osx.yml+++ b/dev/tasks/python-wheels/travis.osx.yml@@ -27,8 +27,8 @@ env:- PYARROW_VERSION={{ arrow.version }}- MACOSX_DEPLOYMENT_TARGET="10.9"- MB_PYTHON_VERSION={{ python_version }}- - NP_BUILD_DEP="{{ numpy_version }}"- - NP_TEST_DEP="{{ numpy_version }}"+ - NP_BUILD_DEP="{{ numpy_build_version }}"+ - NP_TEST_DEP="{{ numpy_test_version }}"- PANDAS_DEP="{{ pandas_version }}"before_install:@@ -53,8 +53,15 @@ install:- TEST_DEPENDS="numpy==$NP_TEST_DEP six pandas==$PANDAS_DEP"- mkdir -p dist++ # multibuild's default clean_code function- clean_code arrow $BUILD_REF- - build_wheel arrow $PLAT++ # the following functions are defined in osx-build.sh+ - build_wheel arrow+ - install_run arrow++ # move built wheels to a top level directory- mv -v arrow/python/dist/* dist/deploy:diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex 7171e7067f..53e149c26e 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -32,6 +32,11 @@ groups:- wheel-linux-cp27mu- wheel-linux-cp35m- wheel-linux-cp36m+ - wheel-osx-cp27m+ - wheel-osx-cp35m+ - wheel-osx-cp36m+ - wheel-win-cp35m+ - wheel-win-cp36mlinux:- debian-stretch- ubuntu-trusty@@ -120,7 +125,6 @@ tasks:platform: wintemplate: conda-recipes/appveyor.ymlparams:- conda_install_location: C:\\Miniconda35-x64variant_config_file: variants\win_c_compilervs2015cxx_compilervs2015python3.5.yamlartifacts:- arrow-cpp-{version}-py35_vc14_0.tar.bz2@@ -131,7 +135,6 @@ tasks:platform: wintemplate: conda-recipes/appveyor.ymlparams:- conda_install_location: C:\\Miniconda36-x64variant_config_file: variants\win_c_compilervs2015cxx_compilervs2015python3.6.yamlartifacts:- arrow-cpp-{version}-py36_vc14_0.tar.bz2@@ -178,7 +181,8 @@ tasks:platform: osxtemplate: python-wheels/travis.osx.ymlparams:- numpy_version: 1.10.1+ numpy_build_version: 1.10.4+ numpy_test_version: 1.14.0pandas_version: 0.20.3python_version: 2.7artifacts:@@ -188,7 +192,8 @@ tasks:platform: osxtemplate: python-wheels/travis.osx.ymlparams:- numpy_version: 1.10.1+ numpy_build_version: 1.10.4+ numpy_test_version: 1.14.0pandas_version: 0.20.3python_version: 3.5artifacts:@@ -198,7 +203,8 @@ tasks:platform: osxtemplate: python-wheels/travis.osx.ymlparams:- numpy_version: 1.11.3+ numpy_build_version: 1.11.3+ numpy_test_version: 1.14.0pandas_version: 0.20.3python_version: 3.6artifacts: