From 3d18e531c21464016b4060040bfcf97b2192424d Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:17:14 +0530 Subject: [PATCH] Update macos-python-builder.psm1 --- builders/macos-python-builder.psm1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/builders/macos-python-builder.psm1 b/builders/macos-python-builder.psm1 index 90c4d98..01664f0 100644 --- a/builders/macos-python-builder.psm1 +++ b/builders/macos-python-builder.psm1 @@ -32,11 +32,16 @@ class macOSPythonBuilder : NixPythonBuilder { #> # Only for Python 3.7.17, install additional dependencies - if ($this.Version -eq "3.7.17") { - Write-Host "Installing additional dependencies for Python 3.7.17..." - # Install necessary dependencies for Python 3.7.17 - Execute-Command -Command "brew install bzip2 zlib readline ncurses sqlite3 openssl@1.1" - } + if ($this.Version -eq "3.7.17") { + Write-Host "Installing additional dependencies for Python 3.7.17..." + # Install necessary dependencies for Python 3.7.17 + Execute-Command -Command "brew install bzip2 zlib readline ncurses sqlite3 openssl@1.1" + + # Ensure the environment variables for zlib are set correctly + $zlibPrefix = (brew --prefix zlib) + $env:LDFLAGS += " -L$($zlibPrefix)/lib" + $env:CFLAGS += " -I$($zlibPrefix)/include" + } } [void] Configure() {