From c2ab2846dd7b616312c36fff03fd186a3ffc01cd Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 26 May 2023 16:16:20 -0400 Subject: [PATCH 1/2] Workarounds to allow github macOS CI tests to run for 3.7. Note that this is intended solely for the current github CI macOS environment, in particular, macOS 12 on Intel-64 only. Out of the box, 3.7.x does not fully support macOS 11 and later systems and does not fully support building or running on Apple Silicon Macs (which were first supported in macOS 11), all of which were released after 3.7 had reached the security-fix-only phase of its life cycle. --- .github/workflows/build.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 149436319673a0..846f021a414457 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,7 +128,24 @@ jobs: steps: - uses: actions/checkout@v2 - name: Configure CPython - run: SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev + run: | + brew install pkg-config openssl@1.1 xz gdbm tcl-tk + brew install zlib bzip2 ncurses readline sqlite + SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk \ + CC=clang \ + CPPFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include \ + -I$(brew --prefix zlib)/include -I$(brew --prefix bzip2)/include \ + -I$(brew --prefix ncurses)/include -I$(brew --prefix readline)/include \ + -I$(brew --prefix sqlite)/include" \ + LDFLAGS="-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib \ + -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib \ + -L$(brew --prefix ncurses)/lib -L$(brew --prefix readline)/lib \ + -L$(brew --prefix sqlite)/lib" \ + ./configure --prefix=/opt/python-dev \ + --with-pydebug \ + --with-openssl="$(brew --prefix openssl@1.1)" \ + --with-tcltk-libs="$(pkg-config --libs tk)" \ + --with-tcltk-includes="$(pkg-config --cflags tk)" - name: Build CPython run: make -j4 - name: Display build info From a7e78af9b6439fda1a341ab51dda2ccf483024cb Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 27 May 2023 00:51:15 -0400 Subject: [PATCH 2/2] Disable unnecessary Homebrew cleanup. --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 846f021a414457..cc2e41aad5d186 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,6 +125,10 @@ jobs: runs-on: macos-latest needs: check_source if: needs.check_source.outputs.run_tests == 'true' + env: + HOMEBREW_NO_ANALYTICS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 steps: - uses: actions/checkout@v2 - name: Configure CPython