From e086cbefb87ad1fb0f51ce8bff92e6176921214b 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 074dfbf80..64ef79e56 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 (<5.99 used because <6 installs v6.0.0rc2) for # macOS 10.13 compatibility (v6+ depends on debugpy), v5.5.6 resolves # ipython/ipykernel#759. Line can be removed with PyQt6 (macOS 10.14+).