kou commented on a change in pull request #10659: URL: https://github.com/apache/arrow/pull/10659#discussion_r668350294
########## File path: ci/scripts/install_python.sh ########## @@ -0,0 +1,72 @@ +#!/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 -e + +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) + +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 Review comment: ```suggestion if [ $platform = "MacOSX" ]; then ``` ########## File path: ci/scripts/install_python.sh ########## @@ -0,0 +1,72 @@ +#!/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 -e Review comment: ```suggestion set -eu ``` ########## File path: python/requirements-wheel-build.txt ########## @@ -1,6 +1,7 @@ cython>=0.29.11 numpy==1.16.6; python_version < "3.9" and platform_machine != "aarch64" Review comment: ```suggestion numpy==1.16.6; python_version < "3.9" and (platform_machine == "i686" or platform_machine == "x86_64") ``` ########## File path: cpp/cmake_modules/FindSnappyAlt.cmake ########## @@ -0,0 +1,117 @@ +# 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(find_package_args) Review comment: Do we revert this change before we merge this? ########## File path: python/requirements-wheel-build.txt ########## @@ -1,6 +1,7 @@ cython>=0.29.11 numpy==1.16.6; python_version < "3.9" and platform_machine != "aarch64" -numpy==1.19.4; python_version >= "3.9" or platform_machine == "aarch64" -pandas<1.1.0; python_version < "3.8" Review comment: Is this deletion intentional? ########## File path: dev/tasks/python-wheels/github.osx.arm64.yml ########## @@ -0,0 +1,128 @@ +# 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. + +# Prerequisits on the host: +# - brew install bash bison coreutils ninja cmake +# - sudo arrow/ci/scripts/install_python.sh macos 3.9 + +{% import 'macros.jinja' as macros with context %} + +{{ macros.github_header() }} + +env: + ARROW_S3: {{ arrow_s3 }} + ARROW_FLIGHT: OFF + ARROW_JEMALLOC: OFF + ARROW_SIMD_LEVEL: NONE + CC: "clang" + CMAKE_CXX_COMPILER_LAUNCHER: "ccache" Review comment: Do we need this? I think that our CMake configuration detects ccache automatically. ########## File path: ci/scripts/python_wheel_macos_build.sh ########## @@ -31,11 +31,24 @@ 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 SDKROOT=${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)} +export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-10.9} +if [ "$(uname -m)" = "arm64" ]; then + export CMAKE_APPLE_SILICON_PROCESSOR=arm64 + export CFLAGS="-arch arm64" + export CXXFLAGS="-arch arm64" + export ARCHFLAGS="-arch arm64" + export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-arm64" +else + export CFLAGS="-arch x86_64" + export CXXFLAGS="-arch x86_64" + export ARCHFLAGS="-arch x86_64" + export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64" +fi + +echo "=== (${PYTHON_VERSION}) Install python build dependencies ===" Review comment: ```suggestion echo "=== (${PYTHON_VERSION}) Install Python build dependencies ===" ``` ########## File path: dev/tasks/python-wheels/github.osx.amd64.yml ########## @@ -19,28 +19,29 @@ {{ macros.github_header() }} env: + CC: "clang" + CXX: "clang++" Review comment: Could you keep this list in alphabetical order? ########## File path: python/requirements-wheel-build.txt ########## @@ -1,6 +1,7 @@ cython>=0.29.11 numpy==1.16.6; python_version < "3.9" and platform_machine != "aarch64" -numpy==1.19.4; python_version >= "3.9" or platform_machine == "aarch64" -pandas<1.1.0; python_version < "3.8" +numpy==1.19.4; sys_platform != "darwin" and (python_version >= "3.9" or platform_machine == "aarch64") +numpy==1.19.4; sys_platform == "darwin" and python_version >= "3.9" and platform_machine != "arm64" +numpy==1.21.0; sys_platform == "darwin" and platform_machine == "arm64" Review comment: ```suggestion numpy==1.19.4; python_version >= "3.9" and platform_machine != "arm64" numpy==1.21.0; platform_machine == "arm64" ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
