From e85a548b56557b05701434be329d5c5837b8c069 Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 15 Aug 2024 19:57:03 +0200 Subject: [PATCH 1/2] CI: Test on macOS arm64 --- .github/workflows/ci.yml | 13 ++++++++++--- ...F2CF2568-49B1-49EF-8B16-70491B9C8FDA.trivial.rst | 0 tests/functional/test_uninstall_user.py | 8 ++++++++ tests/requirements.txt | 4 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 news/F2CF2568-49B1-49EF-8B16-70491B9C8FDA.trivial.rst diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 662a8d993fb..a75c61367db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,8 @@ on: pull_request: schedule: - cron: 0 0 * * MON # Run every Monday at 00:00 UTC + workflow_dispatch: + # allow manual runs on branches without a PR env: # The "FORCE_COLOR" variable, when set to 1, @@ -107,7 +109,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, macos-12] + os: [ubuntu-latest, macos-12, macos-latest] python: - "3.8" - "3.9" @@ -130,8 +132,13 @@ jobs: sudo apt-get install bzr - name: Install MacOS dependencies - if: matrix.os == 'macos-12' - run: brew install breezy + if: runner.os == 'macOS' + run: | + DEPS=breezy + if ! which svn; then + DEPS="${DEPS} subversion" + fi + brew install ${DEPS} - run: pip install nox diff --git a/news/F2CF2568-49B1-49EF-8B16-70491B9C8FDA.trivial.rst b/news/F2CF2568-49B1-49EF-8B16-70491B9C8FDA.trivial.rst new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/functional/test_uninstall_user.py b/tests/functional/test_uninstall_user.py index 0129d2e46a1..c49120ec28d 100644 --- a/tests/functional/test_uninstall_user.py +++ b/tests/functional/test_uninstall_user.py @@ -2,6 +2,8 @@ tests specific to uninstalling --user installs """ +import platform +import sys from os.path import isdir, isfile, normcase import pytest @@ -74,6 +76,12 @@ def test_uninstall_from_usersite_with_dist_in_global_site( dist_info_folder = script.base_path / script.site_packages / "pkg-0.1.dist-info" assert isdir(dist_info_folder) + @pytest.mark.xfail( + sys.platform == "darwin" + and platform.machine() == "arm64" + and sys.version_info[:2] in {(3, 8), (3, 9)}, + reason="Unexpected egg-link install path", + ) def test_uninstall_editable_from_usersite( self, script: PipTestEnvironment, data: TestData ) -> None: diff --git a/tests/requirements.txt b/tests/requirements.txt index 5c3ef4188f7..60e01d57e12 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,8 +8,8 @@ pytest-rerunfailures pytest-xdist scripttest setuptools -virtualenv < 20.0 ; python_version < '3.10' -virtualenv >= 20.0 ; python_version >= '3.10' +virtualenv < 20.0 ; python_version < '3.10' and (sys_platform != 'darwin' or platform_machine != 'arm64') +virtualenv >= 20.0 ; python_version >= '3.10' or (sys_platform == 'darwin' and platform_machine == 'arm64') werkzeug wheel tomli-w From 964229e834e8a92c7f4cc67a7a7493dcf42d213e Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 24 Aug 2024 10:46:23 +0200 Subject: [PATCH 2/2] Add a comment for virtualenv --- tests/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/requirements.txt b/tests/requirements.txt index 60e01d57e12..49f589b13d7 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -8,6 +8,8 @@ pytest-rerunfailures pytest-xdist scripttest setuptools +# macOS (darwin) arm64 always uses virtualenv >= 20.0 +# for other platforms, it depends on python version virtualenv < 20.0 ; python_version < '3.10' and (sys_platform != 'darwin' or platform_machine != 'arm64') virtualenv >= 20.0 ; python_version >= '3.10' or (sys_platform == 'darwin' and platform_machine == 'arm64') werkzeug