diff --git a/dev/tasks/python-wheels/manylinux1-test.sh b/dev/tasks/python-wheels/manylinux-test.sh similarity index 96% rename from dev/tasks/python-wheels/manylinux1-test.sh rename to dev/tasks/python-wheels/manylinux-test.sh index 776747e334e9d..f5056fb84aee7 100755 --- a/dev/tasks/python-wheels/manylinux1-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 directory python --version diff --git a/dev/tasks/python-wheels/manylinux2010-test.sh b/dev/tasks/python-wheels/manylinux2010-test.sh deleted file mode 100755 index 4d61f90e6c4ee..0000000000000 --- a/dev/tasks/python-wheels/manylinux2010-test.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e - -# Install built wheel -pip install -q /arrow/python/manylinux2010/dist/*.whl - -# Runs tests on installed distribution from an empty directory -python --version - -# Test optional dependencies -python -c " -import sys -import pyarrow -import pyarrow.orc -import pyarrow.parquet -import pyarrow.plasma - -if sys.version_info.major > 2: - import pyarrow.flight - import pyarrow.gandiva -" - -export ARROW_TEST_DATA=/arrow/testing/data - -# Run pyarrow tests -pip install -q -r /arrow/python/requirements-test.txt -pytest -v --pyargs pyarrow diff --git a/dev/tasks/python-wheels/travis.manylinux1.yml b/dev/tasks/python-wheels/travis.manylinux.yml similarity index 86% rename from dev/tasks/python-wheels/travis.manylinux1.yml rename to dev/tasks/python-wheels/travis.manylinux.yml index e6098759ded94..37b122b78885e 100644 --- a/dev/tasks/python-wheels/travis.manylinux1.yml +++ b/dev/tasks/python-wheels/travis.manylinux.yml @@ -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/manylinux1-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: releases diff --git a/dev/tasks/python-wheels/travis.manylinux2010.yml b/dev/tasks/python-wheels/travis.manylinux2010.yml deleted file mode 100644 index d6c7ab24d515d..0000000000000 --- a/dev/tasks/python-wheels/travis.manylinux2010.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -os: linux - -services: - - docker - -# Update docker to support newer docker-compose versions -addons: - apt: - packages: - - docker-ce - -# don't build twice -if: tag IS blank - -env: - global: - - PLAT=x86_64 - - TRAVIS_TAG={{ task.tag }} - -before_script: - - sudo pip install -U docker-compose - -script: - - git clone --no-checkout {{ arrow.remote }} arrow - - git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }} - - git -C arrow checkout {{ arrow.head }} - - mkdir -p dist - - # build wheel - - pushd arrow - - # Pull testing resources - - git submodule init - - git submodule update - - # don't attempt to build it, because the base image by pypa is updated - # regularly and would cause undeterministic builds - - docker-compose pull python-manylinux2010 - - docker-compose run - -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} - -e PYTHON_VERSION="{{ python_version }}" - -e UNICODE_WIDTH="{{ unicode_width }}" - python-manylinux2010 - - 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/manylinux2010-test.sh - {%- endfor %} - - # prepare for deployment - - sudo mv arrow/python/manylinux2010/dist/* dist/ - -deploy: - provider: releases - api_key: $CROSSBOW_GITHUB_TOKEN - file_glob: true - file: dist/*.whl - skip_cleanup: true - on: - tags: true - -notifications: - email: - - {{ job.email }} diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index f3b19dc06104f..875216cc71357 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -159,10 +159,11 @@ tasks: wheel-manylinux1-cp27m: ci: travis platform: linux - template: python-wheels/travis.manylinux1.yml + template: python-wheels/travis.manylinux.yml params: python_version: 2.7 unicode_width: 16 + wheel_tag: manylinux1 test_docker_images: [] artifacts: - pyarrow-{no_rc_version}-cp27-cp27m-manylinux1_x86_64.whl @@ -170,10 +171,11 @@ tasks: wheel-manylinux1-cp27mu: ci: travis platform: linux - template: python-wheels/travis.manylinux1.yml + template: python-wheels/travis.manylinux.yml params: python_version: 2.7 unicode_width: 32 + wheel_tag: manylinux1 test_docker_images: - python:2.7-slim # debian ucs4 artifacts: @@ -182,10 +184,11 @@ tasks: wheel-manylinux1-cp35m: ci: travis platform: linux - template: python-wheels/travis.manylinux1.yml + template: python-wheels/travis.manylinux.yml params: python_version: 3.5 unicode_width: 16 + wheel_tag: manylinux1 test_docker_images: - python:3.5-slim artifacts: @@ -194,10 +197,11 @@ tasks: wheel-manylinux1-cp36m: ci: travis platform: linux - template: python-wheels/travis.manylinux1.yml + template: python-wheels/travis.manylinux.yml params: python_version: 3.6 unicode_width: 16 + wheel_tag: manylinux1 test_docker_images: - python:3.6-slim artifacts: @@ -206,10 +210,11 @@ tasks: wheel-manylinux1-cp37m: ci: travis platform: linux - template: python-wheels/travis.manylinux1.yml + template: python-wheels/travis.manylinux.yml params: python_version: 3.7 unicode_width: 16 + wheel_tag: manylinux1 test_docker_images: - python:3.7-slim artifacts: @@ -218,10 +223,11 @@ tasks: wheel-manylinux2010-cp27m: ci: travis platform: linux - template: python-wheels/travis.manylinux2010.yml + 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 @@ -229,10 +235,11 @@ tasks: wheel-manylinux2010-cp27mu: ci: travis platform: linux - template: python-wheels/travis.manylinux2010.yml + 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: @@ -241,10 +248,11 @@ tasks: wheel-manylinux2010-cp35m: ci: travis platform: linux - template: python-wheels/travis.manylinux2010.yml + 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: @@ -253,10 +261,11 @@ tasks: wheel-manylinux2010-cp36m: ci: travis platform: linux - template: python-wheels/travis.manylinux2010.yml + 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: @@ -265,10 +274,11 @@ tasks: wheel-manylinux2010-cp37m: ci: travis platform: linux - template: python-wheels/travis.manylinux2010.yml + 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: