You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2022/11/08 21:36:26 UTC

[arrow-adbc] branch main updated: ci(c/driver_manager,c/driver/postgres): add macOS wheels (#164)

This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new cb7c25e  ci(c/driver_manager,c/driver/postgres): add macOS wheels (#164)
cb7c25e is described below

commit cb7c25ed8dc73807539c96f0293b2567efb97972
Author: David Li <li...@gmail.com>
AuthorDate: Tue Nov 8 16:36:21 2022 -0500

    ci(c/driver_manager,c/driver/postgres): add macOS wheels (#164)
---
 .github/workflows/packaging-wheels.yml             | 84 +++++++++++++++++++++-
 c/cmake_modules/BuildUtils.cmake                   |  6 ++
 c/driver/postgres/statement.cc                     | 23 ------
 c/driver/postgres/util.h                           | 47 ++++++++++++
 ci/scripts/install_python.sh                       | 70 ++++++++++++++++++
 ci/scripts/install_vcpkg.sh                        | 55 ++++++++++++++
 ...nylinux_build.sh => python_wheel_unix_build.sh} | 50 ++++++++++---
 ci/scripts/python_wheel_unix_test.sh               | 15 +++-
 ci/vcpkg/triplets/x64-linux-static-release.cmake   |  6 ++
 ci/vcpkg/triplets/x64-osx-static-release.cmake     |  7 ++
 docker-compose.yml                                 |  2 +-
 python/adbc_driver_manager/setup.py                |  1 +
 12 files changed, 326 insertions(+), 40 deletions(-)

diff --git a/.github/workflows/packaging-wheels.yml b/.github/workflows/packaging-wheels.yml
index 954b961..89d0696 100644
--- a/.github/workflows/packaging-wheels.yml
+++ b/.github/workflows/packaging-wheels.yml
@@ -58,6 +58,15 @@ jobs:
           export PYTHON=${{ matrix.python_version }}
           docker-compose run python-wheel-manylinux
 
+      - name: Archive wheels
+        uses: actions/upload-artifact@v3
+        with:
+          name: python${{ matrix.python_version }}-manylinux${{ matrix.manylinux_version }}
+          retention-days: 7
+          path: |
+            python/adbc_driver_manager/repaired_wheels/*.whl
+            python/adbc_driver_postgres/repaired_wheels/*.whl
+
       - name: Test wheel
         shell: bash
         run: |
@@ -65,19 +74,88 @@ jobs:
           export PYTHON=${{ matrix.python_version }}
           docker-compose run python-wheel-manylinux-test
 
+      - name: Upload wheels to Gemfury
+        shell: bash
+        if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_wheels == 'true')
+        run: |
+          ./ci/scripts/python_wheel_upload.sh python/adbc_driver_{manager,postgres}/repaired_wheels/*.whl
+        env:
+          GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
+
+  macos:
+    name: "Python ${{ matrix.python_version }} macOS"
+    runs-on: macos-latest
+    strategy:
+      matrix:
+        python_version: ["3.9", "3.10"]
+      # Limit parallelism; gemfury appears to return 409 CONFLICT on concurrent uploads
+      max-parallel: 1
+    env:
+      MACOSX_DEPLOYMENT_TARGET: "10.15"
+      PYTHON: "/Library/Frameworks/Python.framework/Versions/${{ matrix.python_version }}/bin/python${{ matrix.python_version }}"
+      PYTHON_VERSION: "${{ matrix.python_version }}"
+      # Use a custom triplet to only build release packages
+      VCPKG_DEFAULT_TRIPLET: "x64-osx-static-release"
+      # Where to install vcpkg
+      VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+
+      - name: Show inputs
+        shell: bash
+        run: |
+          echo "upload_wheels: ${{ github.event.inputs.upload_wheels }}"
+          echo "schedule: ${{ github.event.schedule }}"
+          echo "ref: ${{ github.ref }}"
+
+      - name: Install Homebrew dependencies
+        shell: bash
+        run: brew install autoconf bash pkg-config ninja
+
+      - name: Retrieve VCPKG version from .env
+        shell: bash
+        run: |
+          vcpkg_version=$(cat ".env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
+          echo "VCPKG_VERSION=$vcpkg_version" | tee -a $GITHUB_ENV
+
+      - name: Install vcpkg
+        shell: bash
+        run: ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION
+
+      - name: Install Python ${{ matrix.python_version }}
+        shell: bash
+        run: sudo ci/scripts/install_python.sh macos ${{ matrix.python_version }}
+
+      - name: Build wheel
+        shell: bash
+        run: |
+          $PYTHON -m venv build-env
+          source build-env/bin/activate
+          ./ci/scripts/python_wheel_unix_build.sh x86_64 $(pwd) $(pwd)/build
+
       - name: Archive wheels
         uses: actions/upload-artifact@v3
         with:
-          name: python${{ matrix.python_version }}-manylinux${{ matrix.manylinux_version }}
+          name: python${{ matrix.python_version }}-macOS
           retention-days: 7
           path: |
             python/adbc_driver_manager/repaired_wheels/*.whl
             python/adbc_driver_postgres/repaired_wheels/*.whl
 
+      - name: Test wheel
+        shell: bash
+        run: |
+          $PYTHON -m venv test-env
+          source test-env/bin/activate
+          ./ci/scripts/python_wheel_unix_test.sh $(pwd)
+
       - name: Upload wheels to Gemfury
         shell: bash
-        if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_wheels)
+        if: github.ref == 'refs/heads/main' && (github.event.schedule || github.event.inputs.upload_wheels == 'true')
         run: |
-          ./ci/scripts/python_wheel_upload.sh python/adbc_driver_{manager,postgres}/repaired_wheels/*.whl
+          ./ci/scripts/python_wheel_upload.sh python/adbc_driver_{manager,postgres}/dist/*.whl
         env:
           GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
diff --git a/c/cmake_modules/BuildUtils.cmake b/c/cmake_modules/BuildUtils.cmake
index 7c3aa73..d719eb3 100644
--- a/c/cmake_modules/BuildUtils.cmake
+++ b/c/cmake_modules/BuildUtils.cmake
@@ -244,6 +244,8 @@ function(ADD_ARROW_LIB LIB_NAME)
     add_library(${LIB_NAME}_objlib OBJECT ${ARG_SOURCES})
     # Necessary to make static linking into other shared libraries work properly
     set_property(TARGET ${LIB_NAME}_objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
+    set_property(TARGET ${LIB_NAME}_objlib PROPERTY CXX_STANDARD 17)
+    set_property(TARGET ${LIB_NAME}_objlib PROPERTY CXX_STANDARD_REQUIRED ON)
     if(ARG_DEPENDENCIES)
       add_dependencies(${LIB_NAME}_objlib ${ARG_DEPENDENCIES})
     endif()
@@ -285,6 +287,8 @@ function(ADD_ARROW_LIB LIB_NAME)
 
   if(BUILD_SHARED)
     add_library(${LIB_NAME}_shared SHARED ${LIB_DEPS})
+    set_property(TARGET ${LIB_NAME}_shared PROPERTY CXX_STANDARD 17)
+    set_property(TARGET ${LIB_NAME}_shared PROPERTY CXX_STANDARD_REQUIRED ON)
     adbc_configure_target(${LIB_NAME}_shared)
     if(EXTRA_DEPS)
       add_dependencies(${LIB_NAME}_shared ${EXTRA_DEPS})
@@ -378,6 +382,8 @@ function(ADD_ARROW_LIB LIB_NAME)
 
   if(BUILD_STATIC)
     add_library(${LIB_NAME}_static STATIC ${LIB_DEPS})
+    set_property(TARGET ${LIB_NAME}_shared PROPERTY CXX_STANDARD 17)
+    set_property(TARGET ${LIB_NAME}_shared PROPERTY CXX_STANDARD_REQUIRED ON)
     adbc_configure_target(${LIB_NAME}_static)
     if(EXTRA_DEPS)
       add_dependencies(${LIB_NAME}_static ${EXTRA_DEPS})
diff --git a/c/driver/postgres/statement.cc b/c/driver/postgres/statement.cc
index 2ed645c..a187f82 100644
--- a/c/driver/postgres/statement.cc
+++ b/c/driver/postgres/statement.cc
@@ -17,7 +17,6 @@
 
 #include "statement.h"
 
-#include <endian.h>
 #include <netinet/in.h>
 #include <array>
 #include <cerrno>
@@ -158,28 +157,6 @@ AdbcStatusCode InferSchema(const TypeMapping& type_mapping, PGresult* result,
   return ADBC_STATUS_OK;
 }
 
-uint32_t LoadNetworkUInt32(const char* buf) {
-  uint32_t v = 0;
-  std::memcpy(&v, buf, sizeof(uint32_t));
-  return ntohl(v);
-}
-
-int64_t LoadNetworkUInt64(const char* buf) {
-  uint64_t v = 0;
-  std::memcpy(&v, buf, sizeof(uint64_t));
-  return be64toh(v);
-}
-
-int32_t LoadNetworkInt32(const char* buf) {
-  return static_cast<int32_t>(LoadNetworkUInt32(buf));
-}
-
-int64_t LoadNetworkInt64(const char* buf) {
-  return static_cast<int64_t>(LoadNetworkUInt64(buf));
-}
-
-uint64_t ToNetworkInt64(int64_t v) { return htobe64(static_cast<uint64_t>(v)); }
-
 /// Helper to manage bind parameters with a prepared statement
 struct BindStream {
   Handle<struct ArrowArrayStream> bind;
diff --git a/c/driver/postgres/util.h b/c/driver/postgres/util.h
index a675255..1442ff3 100644
--- a/c/driver/postgres/util.h
+++ b/c/driver/postgres/util.h
@@ -17,11 +17,20 @@
 
 #pragma once
 
+#include <netinet/in.h>
 #include <cstring>
 #include <sstream>
 #include <string>
 #include <utility>
 
+#if defined(__linux__)
+#include <endian.h>
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+#else
+static_assert(false, "Not supported on this platform");
+#endif
+
 #include "adbc.h"
 
 namespace adbcpq {
@@ -102,4 +111,42 @@ static inline void SetError(struct AdbcError* error, Args&&... args) {
 /// Check an errno-style code and return it if necessary.
 #define CHECK_NA(EXPR) CHECK_NA_IMPL(MAKE_NAME(errno_status_, __COUNTER__), EXPR)
 
+/// Endianness helpers
+
+uint32_t LoadNetworkUInt32(const char* buf) {
+  uint32_t v = 0;
+  std::memcpy(&v, buf, sizeof(uint32_t));
+  return ntohl(v);
+}
+
+int64_t LoadNetworkUInt64(const char* buf) {
+  uint64_t v = 0;
+  std::memcpy(&v, buf, sizeof(uint64_t));
+#if defined(__linux__)
+  return be64toh(v);
+#elif defined(__APPLE__)
+  return ntohll(v);
+#else
+  static_assert(false, "Not supported on this platform");
+#endif
+}
+
+int32_t LoadNetworkInt32(const char* buf) {
+  return static_cast<int32_t>(LoadNetworkUInt32(buf));
+}
+
+int64_t LoadNetworkInt64(const char* buf) {
+  return static_cast<int64_t>(LoadNetworkUInt64(buf));
+}
+
+uint64_t ToNetworkInt64(int64_t v) {
+#if defined(__linux__)
+  return htobe64(static_cast<uint64_t>(v));
+#elif defined(__APPLE__)
+  return htonll(static_cast<uint64_t>(v));
+#else
+  static_assert(false, "Not supported on this platform");
+#endif
+}
+
 }  // namespace adbcpq
diff --git a/ci/scripts/install_python.sh b/ci/scripts/install_python.sh
new file mode 100755
index 0000000..cb0d47d
--- /dev/null
+++ b/ci/scripts/install_python.sh
@@ -0,0 +1,70 @@
+#!/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.
+
+# From apache/arrow/ci/scripts/install_python.sh
+
+set -eu
+
+declare -A platforms
+platforms=([windows]=Windows
+           [macos]=MacOSX
+           [linux]=Linux)
+
+declare -A versions
+versions=([3.7]=3.7.9
+          [3.8]=3.8.10
+          [3.9]=3.9.13
+          [3.10]=3.10.8
+          [3.11]=3.11.0)
+
+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" ] || [ "$version" = "3.10" ] || [ "$version" = "3.11" ]; 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
+else
+    echo "Unsupported platform: $platform"
+fi
diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh
new file mode 100755
index 0000000..76778ef
--- /dev/null
+++ b/ci/scripts/install_vcpkg.sh
@@ -0,0 +1,55 @@
+#!/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.
+
+# From apache/arrow/ci/scripts/install_vcpkg.sh
+
+set -e
+
+if [ "$#" -lt 1 ]; then
+  echo "Usage: $0 ``<target-directory> [<vcpkg-version> [<vcpkg-ports-patch>]]"
+  exit 1
+fi
+
+arrow_dir=$(cd -- "$(dirname -- "$0")/../.." && pwd -P)
+default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"')
+default_vcpkg_ports_patch="${arrow_dir}/ci/vcpkg/ports.patch"
+
+vcpkg_destination=$1
+vcpkg_version=${2:-$default_vcpkg_version}
+vcpkg_ports_patch=${3:-$default_vcpkg_ports_patch}
+
+# reduce the fetched data using a shallow clone
+git clone --shallow-since=2021-04-01 https://github.com/microsoft/vcpkg ${vcpkg_destination}
+
+pushd ${vcpkg_destination}
+
+git checkout "${vcpkg_version}"
+
+if [[ "$OSTYPE" == "msys" ]]; then
+  ./bootstrap-vcpkg.bat -disableMetrics
+else
+  ./bootstrap-vcpkg.sh -disableMetrics
+fi
+
+if [ -f "${vcpkg_ports_patch}" ]; then
+  git apply --verbose --ignore-whitespace ${vcpkg_ports_patch}
+  echo "Patch successfully applied to the VCPKG port files!"
+fi
+
+popd
diff --git a/ci/scripts/python_wheel_manylinux_build.sh b/ci/scripts/python_wheel_unix_build.sh
similarity index 66%
rename from ci/scripts/python_wheel_manylinux_build.sh
rename to ci/scripts/python_wheel_unix_build.sh
index 1f45edc..b4d849c 100755
--- a/ci/scripts/python_wheel_manylinux_build.sh
+++ b/ci/scripts/python_wheel_unix_build.sh
@@ -19,7 +19,14 @@
 
 set -ex
 
+arch=${1}
+source_dir=${2}
+build_dir=${3}
+
 function check_visibility {
+    if [[ $(uname) != "Linux" ]]; then
+       return 0
+    fi
     nm --demangle --dynamic $1 > nm_arrow.log
 
     # Filter out Arrow symbols and see if anything remains.
@@ -38,29 +45,53 @@ function check_visibility {
     fi
 }
 
+function check_wheels {
+    if [[ $(uname) == "Linux" ]]; then
+        echo "=== (${PYTHON_VERSION}) Tag $component wheel with manylinux${MANYLINUX_VERSION} ==="
+        auditwheel repair "$@" -L . -w repaired_wheels
+    else # macOS
+        echo "=== (${PYTHON_VERSION}) Check $component wheel for unbundled dependencies ==="
+        local -r deps=$(delocate-listdeps dist/$component-*.whl)
+        if ! echo $deps | grep -v "python/"; then
+            echo "There are unbundled dependencies."
+            exit 1
+        fi
+    fi
+}
+
 echo "=== (${PYTHON_VERSION}) Building ADBC libpq driver ==="
 : ${CMAKE_BUILD_TYPE:=release}
 : ${CMAKE_UNITY_BUILD:=ON}
 : ${CMAKE_GENERATOR:=Ninja}
 : ${VCPKG_ROOT:=/opt/vcpkg}
-
-mkdir /tmp/libpq-build
-pushd /tmp/libpq-build
+# Enable manifest mode
+: ${VCPKG_FEATURE_FLAGS:=manifests}
+# Add our custom triplets
+: ${VCPKG_OVERLAY_TRIPLETS:="${source_dir}/ci/vcpkg/triplets/"}
+
+if [[ $(uname) == "Linux" ]]; then
+    export ADBC_POSTGRES_LIBRARY=${build_dir}/lib/libadbc_driver_postgres.so
+    : ${VCPKG_DEFAULT_TRIPLET:="x64-linux-static-release"}
+else # macOS
+    export ADBC_POSTGRES_LIBRARY=${build_dir}/lib/libadbc_driver_postgres.dylib
+    : ${VCPKG_DEFAULT_TRIPLET:="x64-osx-static-release"}
+fi
+
+mkdir -p ${build_dir}
+pushd ${build_dir}
 
 cmake \
     -G ${CMAKE_GENERATOR} \
     -DADBC_BUILD_SHARED=ON \
     -DADBC_BUILD_STATIC=OFF \
     -DCMAKE_INSTALL_LIBDIR=lib \
-    -DCMAKE_INSTALL_PREFIX=/tmp/libpq-dist \
+    -DCMAKE_INSTALL_PREFIX=${build_dir} \
     -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
     -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
-    /adbc/c/driver/postgres
+    ${source_dir}/c/driver/postgres
 cmake --build . --target install -j
 popd
 
-export ADBC_POSTGRES_LIBRARY=/tmp/libpq-dist/lib/libadbc_driver_postgres.so
-
 # Check that we don't expose any unwanted symbols
 check_visibility $ADBC_POSTGRES_LIBRARY
 
@@ -69,7 +100,7 @@ check_visibility $ADBC_POSTGRES_LIBRARY
 pip install --upgrade pip
 
 for component in adbc_driver_manager adbc_driver_postgres; do
-    pushd /adbc/python/$component
+    pushd ${source_dir}/python/$component
 
     echo "=== (${PYTHON_VERSION}) Clean build artifacts==="
     rm -rf ./build ./dist ./repaired_wheels ./$component/*.so ./$component/*.so.*
@@ -79,8 +110,7 @@ for component in adbc_driver_manager adbc_driver_postgres; do
     # https://github.com/pypa/pip/issues/5519
     python -m pip wheel -w dist -vvv .
 
-    echo "=== (${PYTHON_VERSION}) Tag $component wheel with manylinux${MANYLINUX_VERSION} ==="
-    auditwheel repair dist/$component-*.whl -L . -w repaired_wheels
+    check_wheels dist/$component-*.whl
 
     popd
 done
diff --git a/ci/scripts/python_wheel_unix_test.sh b/ci/scripts/python_wheel_unix_test.sh
index e6cd5d9..452a941 100755
--- a/ci/scripts/python_wheel_unix_test.sh
+++ b/ci/scripts/python_wheel_unix_test.sh
@@ -22,15 +22,24 @@ set -x
 set -o pipefail
 
 if [ "$#" -ne 1 ]; then
-  echo "Usage: $0 <arrow-src-dir>"
+  echo "Usage: $0 <adbc-src-dir>"
   exit 1
 fi
 
+COMPONENTS="adbc_driver_manager adbc_driver_postgres"
+
 source_dir=${1}
 
 # Install the built wheels
-pip install --force-reinstall ${source_dir}/python/adbc_driver_manager/repaired_wheels/*.whl
-pip install --force-reinstall ${source_dir}/python/adbc_driver_postgres/repaired_wheels/*.whl
+for component in ${COMPONENTS}; do
+    if [[ -d ${source_dir}/python/${component}/repaired_wheels/ ]]; then
+        pip install --force-reinstall \
+            ${source_dir}/python/${component}/repaired_wheels/*.whl
+    else
+        pip install --force-reinstall \
+            ${source_dir}/python/${component}/dist/*.whl
+    fi
+done
 pip install pytest pyarrow pandas
 
 # Test that the modules are importable
diff --git a/ci/vcpkg/triplets/x64-linux-static-release.cmake b/ci/vcpkg/triplets/x64-linux-static-release.cmake
new file mode 100644
index 0000000..e2a1905
--- /dev/null
+++ b/ci/vcpkg/triplets/x64-linux-static-release.cmake
@@ -0,0 +1,6 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+set(VCPKG_BUILD_TYPE release)
+
+set(VCPKG_CMAKE_SYSTEM_NAME Linux)
diff --git a/ci/vcpkg/triplets/x64-osx-static-release.cmake b/ci/vcpkg/triplets/x64-osx-static-release.cmake
new file mode 100644
index 0000000..36bc859
--- /dev/null
+++ b/ci/vcpkg/triplets/x64-osx-static-release.cmake
@@ -0,0 +1,7 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE static)
+set(VCPKG_BUILD_TYPE release)
+
+set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
+set(VCPKG_OSX_ARCHITECTURES x86_64)
diff --git a/docker-compose.yml b/docker-compose.yml
index 7f7c3bc..370e87a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -30,7 +30,7 @@ services:
     image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-${MANYLINUX}-vcpkg-${VCPKG}
     volumes:
       - .:/adbc:delegated
-    command: /adbc/ci/scripts/python_wheel_manylinux_build.sh
+    command: "'/adbc/ci/scripts/python_wheel_unix_build.sh x86_64 /adbc /adbc/build'"
 
   python-wheel-manylinux-test:
     image: ${ARCH}/python:${PYTHON}
diff --git a/python/adbc_driver_manager/setup.py b/python/adbc_driver_manager/setup.py
index 0ae75f1..aef7c9b 100644
--- a/python/adbc_driver_manager/setup.py
+++ b/python/adbc_driver_manager/setup.py
@@ -32,6 +32,7 @@ setup(
     ext_modules=[
         Extension(
             name="adbc_driver_manager._lib",
+            extra_compile_args=["-std=c++17"],
             include_dirs=["../../", "../../c/driver_manager"],
             language="c++",
             sources=[