From 7a92b3ea1bd992eb2f3fee06d29170691c234ce3 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Wed, 31 Jan 2024 18:27:10 +0000 Subject: [PATCH] Support for macOS arm64. --- .github/workflows/test.yml | 11 ++++++++++- setup.py | 9 ++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f96524bf0..de167811b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,17 @@ jobs: timeout-minutes: 30 strategy: matrix: - os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-latest, windows-2019, windows-latest] + # macos-13 is the latest release on x86, and macos-14 is arm64 + os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-13, macos-14, windows-2019, windows-latest] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + exclude: + # These Python versions are not available in macOS arm64 + - os: macos-14 + python-version: '3.7' + - os: macos-14 + python-version: '3.8' + - os: macos-14 + python-version: '3.9' fail-fast: false runs-on: ${{ matrix.os }} name: Test Py ${{ matrix.python-version }} - ${{ matrix.os }} diff --git a/setup.py b/setup.py index da2465fcb..f3509c79f 100644 --- a/setup.py +++ b/setup.py @@ -26,11 +26,14 @@ # which are needed for the main editor to function. # "PyQt5==5.15.10" - + ';"arm" not in platform_machine and "aarch" not in platform_machine', + + '; sys_platform != "linux" ' + + 'or ("arm" not in platform_machine and "aarch" not in platform_machine)', "QScintilla==2.14.1" - + ';"arm" not in platform_machine and "aarch" not in platform_machine', + + '; sys_platform != "linux" ' + + 'or ("arm" not in platform_machine and "aarch" not in platform_machine)', "PyQtChart==5.15.6" - + ';"arm" not in platform_machine and "aarch" not in platform_machine', + + '; sys_platform != "linux" ' + + 'or ("arm" not in platform_machine and "aarch" not in platform_machine)', # ipykernel has to be < v6 for macOS 10.13 compatibility (v6 depends on # debugpy package), v5.5.6 resolves issue ipython/ipykernel#759. # Full line can be removed after Mu v1.3 release as PyQt6 drops old macOS.