forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-2461: [Python] Build manylinux2010 wheels
- Loading branch information
Showing
34 changed files
with
1,483 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.