Skip to content

Commit 6c6754a

Browse files
kouterencehonleskszucssjhewitt
committed
ARROW-6920: [Packaging] Build python 3.8 wheels
adds python3.8 wheels as far as I can tell python3.8 isn't available for Conda yet (conda-forge/python-feedstock#274), so that's will have to be added later Closes #5685 from sjhewitt/arrow-6920 and squashes the following commits: feac494 <Sutou Kouhei> Add a TODO comment 908a396 <Sutou Kouhei> Check Docker version for debug 43833a3 <Sutou Kouhei> Add Python 3.8 support to package metadata f3f9bfa <Krisztián Szűcs> Install tensorflow for 32 bit unicode width py27 cd9ae83 <Sutou Kouhei> Install TensorFlow for Python 2.7 manually 5293f2b <Sutou Kouhei> Pin base image and remove needless virtualenvs 344eecd <Sutou Kouhei> Use apache/arrow-dev again 99cad41 <Sutou Kouhei> Use the uploaded image f0c8e69 <Sutou Kouhei> Link to libpython only on Windows 260fa79 <Sutou Kouhei> Add a missing empty line 52761b4 <Sutou Kouhei> libpython.so may not exist 5e5977e <Sutou Kouhei> Don't link to other Python libraries on non Windows e047d54 <Sutou Kouhei> Don't use local function 10dac67 <Terence D. Honles> move plasma subprocesses to top level functions da300ac <Sutou Kouhei> Don't use TTY c4526d8 <Sutou Kouhei> Use more recent numpy 7ace0cb <Sutou Kouhei> Ensure using the latest image 655f88c <Sutou Kouhei> Use Azure Pipelines instead of Travis CI 2ef6213 <Sutou Kouhei> Use "call conda.bat activate/deactivate" 1c8427e <Sutou Kouhei> Use conda without call 99251ea <Sutou Kouhei> Use "conda activate/deactivate" f403b6f <Sutou Kouhei> Use the latest multibuild c818840 <Sutou Kouhei> Remove m suffix e9f1408 <Sutou Kouhei> Set up Python 3.8 2ab6732 <Simon Hewitt> ARROW-6920: Build python 3.8 wheels Lead-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Terence D. Honles <[email protected]> Co-authored-by: Krisztián Szűcs <[email protected]> Co-authored-by: Simon Hewitt <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 7102d7e commit 6c6754a

File tree

18 files changed

+234
-314
lines changed

18 files changed

+234
-314
lines changed

cpp/src/arrow/python/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL
5252
set_property(SOURCE pyarrow.cc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-cast-qual ")
5353
endif()
5454

55-
set(ARROW_PYTHON_SHARED_LINK_LIBS arrow_shared ${PYTHON_OTHER_LIBS})
56-
55+
set(ARROW_PYTHON_SHARED_LINK_LIBS arrow_shared)
5756
if(WIN32)
58-
set(ARROW_PYTHON_SHARED_LINK_LIBS ${ARROW_PYTHON_SHARED_LINK_LIBS} ${PYTHON_LIBRARIES})
57+
list(APPEND ARROW_PYTHON_SHARED_LINK_LIBS ${PYTHON_LIBRARIES} ${PYTHON_OTHER_LIBS})
5958
endif()
6059

6160
set(ARROW_PYTHON_INCLUDES ${NUMPY_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
jobs:
18+
- job: linux
19+
pool:
20+
vmImage: ubuntu-latest
21+
timeoutInMinutes: 360
22+
steps:
23+
- task: CondaEnvironment@1
24+
inputs:
25+
packageSpecs: 'click github3.py jinja2 jira pygit2 ruamel.yaml setuptools_scm toolz'
26+
installOptions: '-c conda-forge'
27+
updateConda: false
28+
29+
- script: |
30+
set -ex
31+
git clone --no-checkout {{ arrow.remote }} arrow
32+
git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
33+
git -C arrow checkout FETCH_HEAD
34+
git -C arrow submodule update --init --recursive
35+
displayName: Clone arrow
36+
37+
- script: |
38+
set -ex
39+
docker -v
40+
docker-compose -v
41+
cd arrow
42+
BUILD_IMAGE=centos-python-{{ wheel_tag }}
43+
docker-compose pull $BUILD_IMAGE
44+
# TODO(kou): Uncomment this when we resolve "ADD never use cache" problem.
45+
# docker-compose build $BUILD_IMAGE
46+
docker-compose run \
47+
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} \
48+
-e PYTHON_VERSION="{{ python_version }}" \
49+
-e UNICODE_WIDTH="{{ unicode_width }}" \
50+
$BUILD_IMAGE
51+
displayName: Build wheel
52+
53+
# auditwheel does always exit with 0 so it is mostly for debugging
54+
# purposes
55+
- script: |
56+
set -ex
57+
cd arrow
58+
docker run \
59+
-v $(pwd):/arrow quay.io/pypa/{{ wheel_tag }}_x86_64 \
60+
/bin/bash -c \
61+
"auditwheel show /arrow/python/{{ wheel_tag }}/dist/*.whl"
62+
displayName: Audit wheel
63+
64+
- script: |
65+
set -ex
66+
cd arrow
67+
test_args=""
68+
{%- if test_remove_system_libs %}
69+
test_args="${test_args} --remove-system-libs"
70+
{%- endif %}
71+
{%- for image in test_docker_images %}
72+
docker run \
73+
--shm-size 2G \
74+
-v $(pwd):/arrow \
75+
-e WHEEL_TAG="{{ wheel_tag }}" \
76+
{{ image }} \
77+
/arrow/dev/tasks/python-wheels/manylinux-test.sh ${test_args}
78+
{%- endfor %}
79+
displayName: Test wheel
80+
81+
- script: |
82+
set -ex
83+
python arrow/dev/tasks/crossbow.py \
84+
--queue-path . \
85+
--queue-remote {{ queue.remote_url }} \
86+
upload-artifacts \
87+
--pattern "arrow/python/{{ wheel_tag }}/dist/*" \
88+
--sha {{ task.branch }} \
89+
--tag {{ task.tag }}
90+
env:
91+
CROSSBOW_GITHUB_TOKEN: $(CROSSBOW_GITHUB_TOKEN)
92+
displayName: Upload packages as a GitHub release

dev/tasks/python-wheels/travis.linux.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

dev/tasks/python-wheels/travis.osx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ env:
3131
- MACOSX_DEPLOYMENT_TARGET="10.9"
3232

3333
before_install:
34-
- git clone https://github.com/matthew-brett/multibuild # TODO pin it
35-
- git -C multibuild checkout 4e7a9396e9a50731bb83fc0d16bb98fb0c4032d7
34+
- git clone https://github.com/matthew-brett/multibuild
35+
- git -C multibuild checkout 68a4af043e2adb0d9353d4a0e1f3d871203237aa
3636

3737
- git clone --no-checkout {{ arrow.remote }} arrow
3838
- git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}

dev/tasks/python-wheels/win-build.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
@rem create conda environment for compiling
2121
conda update --yes --quiet conda
2222

23-
call conda create -n wheel-build -q -y -c conda-forge ^
23+
conda create -n wheel-build -q -y -c conda-forge ^
2424
--file=%ARROW_SRC%\ci\conda_env_cpp.yml ^
2525
--file=%ARROW_SRC%\ci\conda_env_gandiva.yml ^
2626
python=%PYTHON_VERSION% ^
2727
numpy=%NUMPY_VERSION% ^
2828
|| exit /B
2929

30-
call activate wheel-build
30+
call conda.bat activate wheel-build
3131

3232
@rem Cannot use conda_env_python.yml here because conda-forge has
3333
@rem ceased providing up-to-date packages for Python 3.5
@@ -84,17 +84,17 @@ pushd %ARROW_SRC%\python
8484
python setup.py bdist_wheel || exit /B
8585
popd
8686

87-
call deactivate
87+
call conda.bat deactivate
8888

8989
set ARROW_TEST_DATA=%ARROW_SRC%\testing\data
9090

9191
@rem test the wheel
9292
@rem TODO For maximum reliability, we should test in a plain virtualenv instead.
93-
call conda create -n wheel-test -c conda-forge -q -y ^
93+
conda create -n wheel-test -c conda-forge -q -y ^
9494
--file %ARROW_SRC%\ci\conda_env_python.yml ^
9595
python=%PYTHON_VERSION% ^
9696
numpy=%NUMPY_VERSION% || exit /B
97-
call activate wheel-test
97+
call conda.bat activate wheel-test
9898

9999
@rem install the built wheel
100100
pip install -vv --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow || exit /B

0 commit comments

Comments
 (0)