From 57383fb2e570d4c65962029b70dc641350cf1e17 Mon Sep 17 00:00:00 2001 From: Armen Zambrano G Date: Fri, 10 Sep 2021 12:08:34 -0400 Subject: [PATCH] New script --- .github/workflows/m1.yml | 2 ++ scripts/build/build_macos_arm64.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 scripts/build/build_macos_arm64.sh diff --git a/.github/workflows/m1.yml b/.github/workflows/m1.yml index d9211f82..dc357902 100644 --- a/.github/workflows/m1.yml +++ b/.github/workflows/m1.yml @@ -61,6 +61,8 @@ jobs: PACKAGE_NAME: psycopg2-binary PSYCOPG2_TESTDB: postgres PSYCOPG2_TEST_FAST: 1 + ARCHFLAGS: "-arch arm64" + _PYTHON_HOST_PLATFORM: "macosx-11.0-arm64" - run: | ls -l diff --git a/scripts/build/build_macos_arm64.sh b/scripts/build/build_macos_arm64.sh new file mode 100755 index 00000000..08b6470a --- /dev/null +++ b/scripts/build/build_macos_arm64.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script to generate arm64 wheels on an Apple Silicon host +# +# TODO: File issue on why cross-compiling is not working +python3 -m venv .venv +source .venv/bin/activate +pip install -U pip wheel +pip install cibuildwheel +# You will be prompted for your password in order to install Python under /Applications +PACKAGE_NAME=psycopg2-binary +CIBW_BUILD=cp38-macosx_arm64 cibuildwheel . --output-dir wheelhouse --platform macos 2>&1