Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
c0b0950
m1
Jul 2, 2021
db51c6e
e
Jul 5, 2021
4466493
produce working wheels
Jul 6, 2021
d203560
Cleanup
Jul 6, 2021
f2a01cc
Install python script
kszucs Jul 9, 2021
778c9e6
Remove multibuild dependency
kszucs Jul 9, 2021
daf6ec4
vcpkg version
kszucs Jul 9, 2021
e0487b7
sudo install python and default simd level
kszucs Jul 9, 2021
659e3c5
change order
kszucs Jul 9, 2021
bdac009
fix platform tag
kszucs Jul 9, 2021
30500cf
fix platform tag
kszucs Jul 9, 2021
476f135
crossbow conf
kszucs Jul 12, 2021
332f5e6
crossbow conf
kszucs Jul 12, 2021
668e9d1
crossbow conf
kszucs Jul 12, 2021
c2514c3
crossbow conf
kszucs Jul 12, 2021
0b22e1f
crossbow conf
kszucs Jul 12, 2021
b2ade21
crossbow conf
kszucs Jul 12, 2021
5ca4bf9
crossbow conf
kszucs Jul 12, 2021
a7ac3e8
crossbow conf
kszucs Jul 12, 2021
8ed4511
crossbow conf
kszucs Jul 12, 2021
244eb28
crossbow conf
kszucs Jul 12, 2021
200bb84
crossbow conf
kszucs Jul 12, 2021
0a9a3fb
crossbow conf
kszucs Jul 12, 2021
14f9100
arch emulation
kszucs Jul 12, 2021
f56b34c
arch emulation
kszucs Jul 12, 2021
ce418c9
arch emulation
kszucs Jul 12, 2021
f7d2939
arch emulation
kszucs Jul 12, 2021
14b75af
arch emulation
kszucs Jul 12, 2021
042da1a
arch emulation
kszucs Jul 12, 2021
6d94a5d
arch emulation
kszucs Jul 12, 2021
caa141a
arch emulation
kszucs Jul 12, 2021
2fd9660
arch emulation
kszucs Jul 12, 2021
57be580
cleanup
kszucs Jul 12, 2021
65efea3
pin newer numpy
kszucs Jul 12, 2021
63c2c92
fix requirements conditions
kszucs Jul 12, 2021
d592fcc
fix requirements conditions
kszucs Jul 12, 2021
0487d29
fix requirements conditions
kszucs Jul 12, 2021
47a4b79
artifact upload
kszucs Jul 12, 2021
92789dd
reduce crossbow deps
kszucs Jul 12, 2021
b3ebdb4
templating
kszucs Jul 12, 2021
e369d49
cleanup
kszucs Jul 12, 2021
8e5f156
remove unused scripts
kszucs Jul 12, 2021
f70e6b3
cmake format
kszucs Jul 12, 2021
397b801
req files
kszucs Jul 13, 2021
4b326fc
experiment with universal2
kszucs Jul 13, 2021
34f40d0
fix requirements syntax
kszucs Jul 13, 2021
4b3d740
experiment with universal2
kszucs Jul 13, 2021
2e998d1
universal2 triplet for vcpkg
kszucs Jul 13, 2021
8e1588b
universal2 triplet for vcpkg
kszucs Jul 13, 2021
83db19a
universal2 triplet for vcpkg
kszucs Jul 13, 2021
f27245e
universal2 triplet for vcpkg
kszucs Jul 13, 2021
8a2ef81
universal2 triplet for vcpkg
kszucs Jul 13, 2021
a9bd4f8
prefer universal2 numpy wheels
kszucs Jul 13, 2021
4400459
universal2 platform tag
kszucs Jul 13, 2021
d38f62a
universal2 platform tag
kszucs Jul 13, 2021
15dd7e7
universal2 platform tag
kszucs Jul 13, 2021
95a83c4
universal2 platform tag
kszucs Jul 13, 2021
fcc25ff
cleanup
kszucs Jul 13, 2021
d04c202
install vcpkg with the latest deployment target
kszucs Jul 13, 2021
eb3dd85
limit cache scope
kszucs Jul 13, 2021
fdc8d87
temporarily push manylinux images
kszucs Jul 13, 2021
ec30559
fix build requirements file
kszucs Jul 13, 2021
11d7df5
fix test requirements
kszucs Jul 13, 2021
8bdb02f
fix build requirements file
kszucs Jul 14, 2021
4eb6d2a
manually pack universal2 binary for libcrypto and libssl
kszucs Jul 14, 2021
6c7f44a
redundant env variable
kszucs Jul 15, 2021
00fc488
fix vcpkg build in the windows image
kszucs Jul 19, 2021
ce2562e
revert snappy alt
kszucs Jul 19, 2021
d5e4921
final touches
kszucs Jul 19, 2021
893208a
restore branch condition in the crossbow templates
kszucs Jul 19, 2021
d29f104
don't pull cache_from images if --no-pull is passed
kszucs Jul 19, 2021
bb3b170
update delocate-listdeps regex pattern due to recent delocate release
kszucs Jul 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ci/docker/python-wheel-manylinux-201x.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg && \
ln -s /opt/vcpkg/vcpkg /usr/bin/vcpkg

# Patch ports files as needed
COPY ci/vcpkg arrow/ci/vcpkg
COPY ci/vcpkg/*.patch \
ci/vcpkg/*linux*.cmake \
arrow/ci/vcpkg/
RUN cd /opt/vcpkg && git apply --ignore-whitespace /arrow/ci/vcpkg/ports.patch

ARG build_type=release
Expand Down
15 changes: 10 additions & 5 deletions ci/docker/python-wheel-windows-vs2017.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,32 @@ RUN choco install --no-progress -r -y cmake --installargs 'ADD_CMAKE_TO_PATH=Sys
RUN setx path "%path%;C:\Program Files\Git\usr\bin"

# Install vcpkg
#
# Compiling vcpkg itself from a git tag doesn't work anymore since vcpkg has
# started to ship precompiled binaries for the vcpkg-tool.
ARG vcpkg
RUN git clone https://github.com/Microsoft/vcpkg && \
git -C vcpkg checkout %vcpkg% && \
vcpkg\bootstrap-vcpkg.bat -disableMetrics -win64 && \
setx PATH "%PATH%;C:\vcpkg"
vcpkg\bootstrap-vcpkg.bat -disableMetrics && \
setx PATH "%PATH%;C:\vcpkg" && \
git -C vcpkg checkout %vcpkg%

# Patch ports files as needed
COPY ci/vcpkg arrow/ci/vcpkg
COPY ci/vcpkg/*.patch \
ci/vcpkg/*windows*.cmake \
arrow/ci/vcpkg/
RUN cd vcpkg && git apply --ignore-whitespace C:/arrow/ci/vcpkg/ports.patch

# Configure vcpkg and install dependencies
# NOTE: use windows batch environment notation for build arguments in RUN
# statements but bash notation in ENV statements
# VCPKG_FORCE_SYSTEM_BINARIES=1 spare around ~750MB of image size if the system
# cmake's and ninja's versions are recent enough
COPY ci/vcpkg arrow/ci/vcpkg
ARG build_type=release
ENV CMAKE_BUILD_TYPE=${build_type} \
VCPKG_OVERLAY_TRIPLETS=C:\\arrow\\ci\\vcpkg \
VCPKG_DEFAULT_TRIPLET=x64-windows-static-md-${build_type} \
VCPKG_FEATURE_FLAGS=-manifests

RUN vcpkg install --clean-after-build \
abseil \
aws-sdk-cpp[config,cognito-identity,core,identity-management,s3,sts,transfer] \
Expand Down
66 changes: 66 additions & 0 deletions ci/scripts/install_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env 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 -eu

declare -A platforms
platforms=([windows]=Windows
[macos]=MacOSX
[linux]=Linux)

declare -A versions
versions=([3.6]=3.6.8
[3.7]=3.7.9
[3.8]=3.8.9
[3.9]=3.9.6)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there is no universal2 installers for python < 3.9


if [ "$#" -ne 2 ]; then
echo "Usage: $0 <platform> <version>"
exit 1
elif [[ -z ${platforms[$1]} ]]; then
echo "Unexpected platform: ${1}"
exit 1
fi

platform=${platforms[$1]}
version=$2
full_version=${versions[$2]}

if [ $platform = "MacOSX" ]; then
echo "Downloading Python installer..."
if [ "$(uname -m)" = "arm64" ]; then
fname="python-${full_version}-macos11.pkg"
else
fname="python-${full_version}-macosx10.9.pkg"
fi
wget "https://www.python.org/ftp/python/${full_version}/${fname}"

echo "Installing Python..."
installer -pkg $fname -target /
rm $fname

echo "Installing Pip..."
python="/Library/Frameworks/Python.framework/Versions/${version}/bin/python${version}"
pip="${python} -m pip"

$python -m ensurepip
$pip install -U pip setuptools virtualenv
else
echo "Unsupported platform: $platform"
fi
54 changes: 41 additions & 13 deletions ci/scripts/python_wheel_macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@

set -ex

source_dir=${1}
build_dir=${2}
arch=${1}
source_dir=${2}
build_dir=${3}

echo "=== (${PYTHON_VERSION}) Clear output directories and leftovers ==="
# Clear output directories and leftovers
Expand All @@ -31,11 +32,32 @@ rm -rf ${source_dir}/python/repaired_wheels
rm -rf ${source_dir}/python/pyarrow/*.so
rm -rf ${source_dir}/python/pyarrow/*.so.*

echo "=== (${PYTHON_VERSION}) Set OSX SDK and C flags ==="
# Arrow is 64-bit-only at the moment
export CFLAGS="-fPIC -arch x86_64 ${CFLAGS//-arch i386/}"
export CXXFLAGS="-fPIC -arch x86_64 ${CXXFLAGS//-arch i386} -std=c++11"
export SDKROOT="$(xcrun --show-sdk-path)"
echo "=== (${PYTHON_VERSION}) Set SDK, C++ and Wheel flags ==="
export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-${arch}"
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-10.9}
export SDKROOT=${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}

if [ $arch = "arm64" ]; then
export CMAKE_OSX_ARCHITECTURES="arm64"
elif [ $arch = "x86_64" ]; then
export CMAKE_OSX_ARCHITECTURES="x86_64"
elif [ $arch = "universal2" ]; then
export CMAKE_OSX_ARCHITECTURES="x86_64;arm64"
else
echo "Unexpected architecture: $arch"
exit 1
fi

echo "=== (${PYTHON_VERSION}) Install Python build dependencies ==="
export PIP_SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')
export PIP_TARGET_PLATFORM="macosx_${MACOSX_DEPLOYMENT_TARGET//./_}_${arch}"

pip install \
--only-binary=:all: \
--target $PIP_SITE_PACKAGES \
--platform $PIP_TARGET_PLATFORM \
-r ${source_dir}/python/requirements-wheel-build.txt
pip install "delocate>=0.9"

echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
: ${ARROW_DATASET:=ON}
Expand All @@ -48,6 +70,7 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
: ${ARROW_PARQUET:=ON}
: ${ARROW_PLASMA:=ON}
: ${ARROW_S3:=ON}
: ${ARROW_SIMD_LEVEL:="SSE4_2"}
: ${ARROW_TENSORFLOW:=ON}
: ${ARROW_WITH_BROTLI:=ON}
: ${ARROW_WITH_BZ2:=ON}
Expand All @@ -57,19 +80,23 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
: ${ARROW_WITH_ZSTD:=ON}
: ${CMAKE_BUILD_TYPE:=release}
: ${CMAKE_GENERATOR:=Ninja}
: ${CMAKE_UNITY_BUILD:=ON}
: ${VCPKG_FEATURE_FLAGS:=-manifests}
: ${VCPKG_TARGET_TRIPLET:=${VCPKG_DEFAULT_TRIPLET:-x64-osx-static-${CMAKE_BUILD_TYPE}}}

mkdir -p ${build_dir}/build
pushd ${build_dir}/build

cmake \
-DARROW_BUILD_SHARED=ON \
-DCMAKE_APPLE_SILICON_PROCESSOR=arm64 \
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \
-DARROW_BUILD_STATIC=OFF \
-DARROW_BUILD_TESTS=OFF \
-DARROW_DATASET=${ARROW_DATASET} \
-DARROW_DEPENDENCY_SOURCE="VCPKG" \
-DARROW_DEPENDENCY_USE_SHARED=OFF \
-DARROW_FLIGHT==${ARROW_FLIGHT} \
-DARROW_FLIGHT=${ARROW_FLIGHT} \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gRPC is not supported on apple silicon at the moment

-DARROW_GANDIVA=${ARROW_GANDIVA} \
-DARROW_HDFS=${ARROW_HDFS} \
-DARROW_JEMALLOC=${ARROW_JEMALLOC} \
Expand All @@ -81,6 +108,7 @@ cmake \
-DARROW_PYTHON=ON \
-DARROW_RPATH_ORIGIN=ON \
-DARROW_S3=${ARROW_S3} \
-DARROW_SIMD_LEVEL=${ARROW_SIMD_LEVEL} \
-DARROW_TENSORFLOW=${ARROW_TENSORFLOW} \
-DARROW_USE_CCACHE=ON \
-DARROW_WITH_BROTLI=${ARROW_WITH_BROTLI} \
Expand All @@ -92,7 +120,7 @@ cmake \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=${build_dir}/install \
-DCMAKE_UNITY_BUILD=ON \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
-DOPENSSL_USE_STATIC_LIBS=ON \
-DVCPKG_MANIFEST_MODE=OFF \
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
Expand All @@ -101,9 +129,6 @@ cmake \
cmake --build . --target install
popd

# Check that we don't expose any unwanted symbols
# check_arrow_visibility

echo "=== (${PYTHON_VERSION}) Building wheel ==="
export PYARROW_BUILD_TYPE=${CMAKE_BUILD_TYPE}
export PYARROW_BUNDLE_ARROW_CPP=1
Expand All @@ -117,8 +142,11 @@ export PYARROW_WITH_ORC=${ARROW_ORC}
export PYARROW_WITH_PARQUET=${ARROW_PARQUET}
export PYARROW_WITH_PLASMA=${ARROW_PLASMA}
export PYARROW_WITH_S3=${ARROW_S3}
export PYARROW_CMAKE_OPTIONS="-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DARROW_SIMD_LEVEL=${ARROW_SIMD_LEVEL}"
# PyArrow build configuration
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:${build_dir}/install/lib/pkgconfig
# Set PyArrow version explicitly
export SETUPTOOLS_SCM_PRETEND_VERSION=${PYARROW_VERSION}

pushd ${source_dir}/python
python setup.py bdist_wheel
Expand All @@ -127,7 +155,7 @@ popd
echo "=== (${PYTHON_VERSION}) Show dynamic libraries the wheel depend on ==="
deps=$(delocate-listdeps ${source_dir}/python/dist/*.whl)

if echo $deps | grep -v "^@rpath/lib\(arrow\|gandiva\|parquet\|plasma\)"; then
if echo $deps | grep -v "^pyarrow/lib\(arrow\|gandiva\|parquet\|plasma\)"; then
echo "There are non-bundled shared library dependencies."
exit 1
fi
7 changes: 5 additions & 2 deletions ci/scripts/python_wheel_macos_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ set -ex
source_dir=${1}

: ${ARROW_S3:=ON}
: ${ARROW_FLIGHT:=ON}

export PYARROW_TEST_CYTHON=OFF
export PYARROW_TEST_DATASET=ON
export PYARROW_TEST_FLIGHT=${ARROW_FLIGHT}
export PYARROW_TEST_GANDIVA=OFF
export PYARROW_TEST_HDFS=ON
export PYARROW_TEST_ORC=ON
Expand All @@ -33,7 +35,6 @@ export PYARROW_TEST_PARQUET=ON
export PYARROW_TEST_PLASMA=ON
export PYARROW_TEST_S3=${ARROW_S3}
export PYARROW_TEST_TENSORFLOW=ON
export PYARROW_TEST_FLIGHT=ON

export ARROW_TEST_DATA=${source_dir}/testing/data
export PARQUET_TEST_DATA=${source_dir}/submodules/parquet-testing/data
Expand All @@ -47,7 +48,6 @@ import pyarrow
import pyarrow._hdfs
import pyarrow.csv
import pyarrow.dataset
import pyarrow.flight
import pyarrow.fs
import pyarrow.json
import pyarrow.orc
Expand All @@ -58,6 +58,9 @@ import pyarrow.plasma
if [ "${PYARROW_TEST_S3}" == "ON" ]; then
python -c "import pyarrow._s3fs"
fi
if [ "${PYARROW_TEST_FLIGHT}" == "ON" ]; then
python -c "import pyarrow.flight"
fi

# Install testing dependencies
pip install -r ${source_dir}/python/requirements-wheel-test.txt
Expand Down
25 changes: 25 additions & 0 deletions ci/vcpkg/arm64-osx-static-debug.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE debug)
25 changes: 25 additions & 0 deletions ci/vcpkg/arm64-osx-static-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)
25 changes: 25 additions & 0 deletions ci/vcpkg/universal2-osx-static-debug.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES "x86_64\;arm64")

set(VCPKG_BUILD_TYPE debug)
25 changes: 25 additions & 0 deletions ci/vcpkg/universal2-osx-static-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES "x86_64\;arm64")

set(VCPKG_BUILD_TYPE release)
Loading