Apache DataFusion SQL Query Engine
ARROW-2461: [Python] Build manylinux2010 wheels
Antoine Pitrou664773fc9203
diff --git a/dev/tasks/conda-recipes/appveyor.yml b/dev/tasks/conda-recipes/appveyor.ymlindex df4bbd6cff..5d677c63bf 100644--- a/dev/tasks/conda-recipes/appveyor.yml+++ b/dev/tasks/conda-recipes/appveyor.yml@@ -45,7 +45,7 @@ test_script:# Clone arrow- git clone --no-checkout {{ arrow.remote }} arrow || exit /B- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }} || exit /B- - git -C arrow checkout {{ arrow.head }} || exit /B+ - git -C arrow checkout FETCH_HEAD || exit /B- pushd arrow\dev\tasks\conda-recipesdiff --git a/dev/tasks/conda-recipes/travis.linux.yml b/dev/tasks/conda-recipes/travis.linux.ymlindex 703ebf0018..9e9f94f4a6 100644--- a/dev/tasks/conda-recipes/travis.linux.yml+++ b/dev/tasks/conda-recipes/travis.linux.yml@@ -49,7 +49,7 @@ install:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- pushd arrow/dev/tasks/conda-recipesdiff --git a/dev/tasks/conda-recipes/travis.osx.yml b/dev/tasks/conda-recipes/travis.osx.ymlindex 83837cacb0..3093cac9d7 100644--- a/dev/tasks/conda-recipes/travis.osx.yml+++ b/dev/tasks/conda-recipes/travis.osx.yml@@ -48,7 +48,7 @@ install:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- pushd arrow/dev/tasks/conda-recipesdiff --git a/dev/tasks/docker-tests/circle.linux.yml b/dev/tasks/docker-tests/circle.linux.ymlindex 47f18173d0..7b664eeafe 100644--- a/dev/tasks/docker-tests/circle.linux.yml+++ b/dev/tasks/docker-tests/circle.linux.yml@@ -25,7 +25,7 @@ jobs:- run: docker-compose -v- run: git clone --no-checkout {{ arrow.remote }} arrow- run: git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - run: git -C arrow checkout {{ arrow.head }}+ - run: git -C arrow checkout FETCH_HEAD- run: git -C arrow submodule update --init --recursive- run: |pushd arrowdiff --git a/dev/tasks/docker-tests/travis.linux.yml b/dev/tasks/docker-tests/travis.linux.ymlindex d55d207e3b..7d910d74ba 100644--- a/dev/tasks/docker-tests/travis.linux.yml+++ b/dev/tasks/docker-tests/travis.linux.yml@@ -45,7 +45,7 @@ before_install:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- git -C arrow submodule update --init --recursivescript:diff --git a/dev/tasks/gandiva-jars/travis.linux.yml b/dev/tasks/gandiva-jars/travis.linux.ymlindex a7b800f3f3..8b3bc21f01 100644--- a/dev/tasks/gandiva-jars/travis.linux.yml+++ b/dev/tasks/gandiva-jars/travis.linux.yml@@ -43,7 +43,7 @@ before_install:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrowdiff --git a/dev/tasks/gandiva-jars/travis.osx.yml b/dev/tasks/gandiva-jars/travis.osx.ymlindex efe8feca01..ac25b0470e 100644--- a/dev/tasks/gandiva-jars/travis.osx.yml+++ b/dev/tasks/gandiva-jars/travis.osx.yml@@ -35,7 +35,7 @@ env:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrow- brew updatediff --git a/dev/tasks/linux-packages/travis.linux.arm64.yml b/dev/tasks/linux-packages/travis.linux.arm64.ymlindex 853b7069dc..7bb5ad0496 100644--- a/dev/tasks/linux-packages/travis.linux.arm64.yml+++ b/dev/tasks/linux-packages/travis.linux.arm64.yml@@ -40,7 +40,7 @@ env:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEADscript:- pushd arrow/dev/tasks/linux-packagesdiff --git a/dev/tasks/linux-packages/travis.linux.yml b/dev/tasks/linux-packages/travis.linux.ymlindex 937d4c7e7c..7546587d12 100644--- a/dev/tasks/linux-packages/travis.linux.yml+++ b/dev/tasks/linux-packages/travis.linux.yml@@ -34,7 +34,7 @@ env:before_script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEADscript:- pushd arrow/dev/tasks/linux-packagesdiff --git a/dev/tasks/python-wheels/appveyor.yml b/dev/tasks/python-wheels/appveyor.ymlindex 9576e64804..6ad31dd332 100644--- a/dev/tasks/python-wheels/appveyor.yml+++ b/dev/tasks/python-wheels/appveyor.yml@@ -36,7 +36,7 @@ build_script:- git clone --no-checkout {{ arrow.remote }} %ARROW_SRC% || exit /B- git -C %ARROW_SRC% fetch -t {{ arrow.remote }} {{ arrow.branch }} || exit /B- - git -C %ARROW_SRC% checkout {{ arrow.head }} || exit /B+ - git -C %ARROW_SRC% checkout FETCH_HEAD || exit /B- git -C %ARROW_SRC% submodule update --init || exit /B# Avoid picking up AppVeyor-installed OpenSSL (linker errors with gRPC)diff --git a/dev/tasks/python-wheels/linux-test.sh b/dev/tasks/python-wheels/manylinux-test.shsimilarity index 94%rename from dev/tasks/python-wheels/linux-test.shrename to dev/tasks/python-wheels/manylinux-test.shindex 1fdabc735d..f5056fb84a 100755--- a/dev/tasks/python-wheels/linux-test.sh+++ b/dev/tasks/python-wheels/manylinux-test.sh@@ -20,7 +20,7 @@set -e# Install built wheel-pip install -q /arrow/python/manylinux1/dist/*.whl+pip install -q /arrow/python/$WHEEL_TAG/dist/*.whl# Runs tests on installed distribution from an empty directorypython --version@@ -34,6 +34,7 @@ import pyarrow.parquetimport pyarrow.plasmaif sys.version_info.major > 2:+ import pyarrow.flightimport pyarrow.gandiva"diff --git a/dev/tasks/python-wheels/travis.linux.yml b/dev/tasks/python-wheels/travis.manylinux.ymlsimilarity index 84%rename from dev/tasks/python-wheels/travis.linux.ymlrename to dev/tasks/python-wheels/travis.manylinux.ymlindex 31e633e675..e3670e4319 100644--- a/dev/tasks/python-wheels/travis.linux.yml+++ b/dev/tasks/python-wheels/travis.manylinux.yml@@ -39,7 +39,7 @@ before_script:script:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD- mkdir -p dist# build wheel@@ -51,22 +51,25 @@ script:# don't attempt to build it, because the base image by pypa is updated# regularly and would cause undeterministic builds- - docker-compose pull python-manylinux1+ - BUILD_IMAGE=python-{{ wheel_tag }}+ - docker-compose pull $BUILD_IMAGE- docker-compose run-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }}-e PYTHON_VERSION="{{ python_version }}"-e UNICODE_WIDTH="{{ unicode_width }}"- python-manylinux1+ $BUILD_IMAGE- popd# test on multiple distributions{%- for image in test_docker_images %}- - docker run -it --shm-size 2G --volume $(pwd)/arrow:/arrow {{ image }}- /arrow/dev/tasks/python-wheels/linux-test.sh+ - docker run -it --shm-size 2G --volume $(pwd)/arrow:/arrow+ --env WHEEL_TAG="{{ wheel_tag }}"+ {{ image }}+ /arrow/dev/tasks/python-wheels/manylinux-test.sh{%- endfor %}# prepare for deployment- - sudo mv arrow/python/manylinux1/dist/* dist/+ - sudo mv arrow/python/{{ wheel_tag }}/dist/* dist/deploy:provider: releasesdiff --git a/dev/tasks/python-wheels/travis.osx.yml b/dev/tasks/python-wheels/travis.osx.ymlindex 2db3208dbc..ac58cd822e 100644--- a/dev/tasks/python-wheels/travis.osx.yml+++ b/dev/tasks/python-wheels/travis.osx.yml@@ -36,7 +36,7 @@ before_install:- git clone --no-checkout {{ arrow.remote }} arrow- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}- - git -C arrow checkout {{ arrow.head }}+ - git -C arrow checkout FETCH_HEAD# ARROW-3976 Old versions of git can cause failures when Homebrew prints a# donation solicitation. Attempt to update git@@ -60,9 +60,6 @@ before_install:install:- mkdir -p dist- # multibuild's default clean_code function- - clean_code arrow {{ arrow.head }}-# the following functions are defined in osx-build.sh- build_wheel arrowdiff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex 5e74a5ed03..875216cc71 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -28,11 +28,16 @@ groups:- conda-win-vs2015-py36- conda-win-vs2015-py37wheel:- - wheel-linux-cp27m- - wheel-linux-cp27mu- - wheel-linux-cp35m- - wheel-linux-cp36m- - wheel-linux-cp37m+ - wheel-manylinux1-cp27m+ - wheel-manylinux1-cp27mu+ - wheel-manylinux1-cp35m+ - wheel-manylinux1-cp36m+ - wheel-manylinux1-cp37m+ - wheel-manylinux2010-cp27m+ - wheel-manylinux2010-cp27mu+ - wheel-manylinux2010-cp35m+ - wheel-manylinux2010-cp36m+ - wheel-manylinux2010-cp37m- wheel-osx-cp27m- wheel-osx-cp35m- wheel-osx-cp36m@@ -151,65 +156,134 @@ tasks:############################## Wheel Linux ##################################- wheel-linux-cp27m:+ wheel-manylinux1-cp27m:ci: travisplatform: linux- template: python-wheels/travis.linux.yml+ template: python-wheels/travis.manylinux.ymlparams:python_version: 2.7unicode_width: 16+ wheel_tag: manylinux1test_docker_images: []artifacts:- pyarrow-{no_rc_version}-cp27-cp27m-manylinux1_x86_64.whl- wheel-linux-cp27mu:+ wheel-manylinux1-cp27mu:ci: travisplatform: linux- template: python-wheels/travis.linux.yml+ template: python-wheels/travis.manylinux.ymlparams:python_version: 2.7unicode_width: 32+ wheel_tag: manylinux1test_docker_images:- python:2.7-slim # debian ucs4artifacts:- pyarrow-{no_rc_version}-cp27-cp27mu-manylinux1_x86_64.whl- wheel-linux-cp35m:+ wheel-manylinux1-cp35m:ci: travisplatform: linux- template: python-wheels/travis.linux.yml+ template: python-wheels/travis.manylinux.ymlparams:python_version: 3.5unicode_width: 16+ wheel_tag: manylinux1test_docker_images:- python:3.5-slimartifacts:- pyarrow-{no_rc_version}-cp35-cp35m-manylinux1_x86_64.whl- wheel-linux-cp36m:+ wheel-manylinux1-cp36m:ci: travisplatform: linux- template: python-wheels/travis.linux.yml+ template: python-wheels/travis.manylinux.ymlparams:python_version: 3.6unicode_width: 16+ wheel_tag: manylinux1test_docker_images:- python:3.6-slimartifacts:- pyarrow-{no_rc_version}-cp36-cp36m-manylinux1_x86_64.whl- wheel-linux-cp37m:+ wheel-manylinux1-cp37m:ci: travisplatform: linux- template: python-wheels/travis.linux.yml+ template: python-wheels/travis.manylinux.ymlparams:python_version: 3.7unicode_width: 16+ wheel_tag: manylinux1test_docker_images:- python:3.7-slimartifacts:- pyarrow-{no_rc_version}-cp37-cp37m-manylinux1_x86_64.whl+ wheel-manylinux2010-cp27m:+ ci: travis+ platform: linux+ template: python-wheels/travis.manylinux.yml+ params:+ python_version: 2.7+ unicode_width: 16+ wheel_tag: manylinux2010+ test_docker_images: []+ artifacts:+ - pyarrow-{no_rc_version}-cp27-cp27m-manylinux2010_x86_64.whl++ wheel-manylinux2010-cp27mu:+ ci: travis+ platform: linux+ template: python-wheels/travis.manylinux.yml+ params:+ python_version: 2.7+ unicode_width: 32+ wheel_tag: manylinux2010+ test_docker_images:+ - python:2.7-slim # debian ucs4+ artifacts:+ - pyarrow-{no_rc_version}-cp27-cp27mu-manylinux2010_x86_64.whl++ wheel-manylinux2010-cp35m:+ ci: travis+ platform: linux+ template: python-wheels/travis.manylinux.yml+ params:+ python_version: 3.5+ unicode_width: 16+ wheel_tag: manylinux2010+ test_docker_images:+ - python:3.5-slim+ artifacts:+ - pyarrow-{no_rc_version}-cp35-cp35m-manylinux2010_x86_64.whl++ wheel-manylinux2010-cp36m:+ ci: travis+ platform: linux+ template: python-wheels/travis.manylinux.yml+ params:+ python_version: 3.6+ unicode_width: 16+ wheel_tag: manylinux2010+ test_docker_images:+ - python:3.6-slim+ artifacts:+ - pyarrow-{no_rc_version}-cp36-cp36m-manylinux2010_x86_64.whl++ wheel-manylinux2010-cp37m:+ ci: travis+ platform: linux+ template: python-wheels/travis.manylinux.yml+ params:+ python_version: 3.7+ unicode_width: 16+ wheel_tag: manylinux2010+ test_docker_images:+ - python:3.7-slim+ artifacts:+ - pyarrow-{no_rc_version}-cp37-cp37m-manylinux2010_x86_64.whl+############################## Wheel OSX ####################################wheel-osx-cp27m:diff --git a/docker-compose.yml b/docker-compose.ymlindex 6ff601deba..adad951a2c 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -439,6 +439,28 @@ services:- ./python/manylinux1:/io:delegatedcommand: /io/build_arrow.sh+ python-manylinux2010:+ # Usage:+ # either build:+ # $ docker-compose build python-manylinux2010+ # or pull:+ # $ docker-compose pull python-manylinux2010+ # an then run:+ # $ docker-compose run -e PYTHON_VERSION=3.7 python-manylinux2010+ image: quay.io/ursa-labs/arrow_manylinux2010_x86_64_base:latest+ build:+ context: python/manylinux2010+ dockerfile: Dockerfile-x86_64_base+ shm_size: 2G+ environment:+ PYARROW_PARALLEL: 3+ PYTHON_VERSION: ${PYTHON_VERSION:-3.6}+ UNICODE_WIDTH: ${UNICODE_WIDTH:-16}+ volumes:+ - .:/arrow:delegated+ - ./python/manylinux2010:/io:delegated+ command: /io/build_arrow.sh+######################### Integration Tests ################################## impala: