@@ -31,14 +31,6 @@ class macOSPythonBuilder : NixPythonBuilder {
3131. SYNOPSIS
3232 Prepare system environment by installing dependencies and required packages.
3333#>
34-
35- if ($this.Version -eq " 3.7.17" ) {
36- # We have preinstalled ncurses and readLine on the hoster runners. But we need to install bzip2 for
37- # setting up an environemnt
38- # If we get any issues realted to ncurses or readline we can try to run this command
39- # brew install ncurses readline
40- Execute- Command- Command" brew install bzip2"
41- }
4234 }
4335
4436 [void ] Configure() {
@@ -58,46 +50,20 @@ class macOSPythonBuilder : NixPythonBuilder {
5850# ## will never be used itself by a Github Actions runner but using a universal2 Python is the only way to build
5951# ## universal2 C extensions and wheels. This is supported by Python >= 3.10 and was backported to Python >=
6052# ## 3.9.1 and >= 3.8.10.
61- # ## Disabled, discussion: https://github.com/actions/python-versions/pull/114
62- # if ($this.Version -ge "3.8.10" -and $this.Version -ne "3.8.13" -and $this.Version -ne "3.9.0" ) {
63- # $configureString += " --enable-universalsdk --with-universal-archs=universal2"
64- # }
6553
6654# ## OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
6755# ## Solution is to install these libraries from a third-party package manager,
6856# ## and then add the appropriate paths for the header and library files to configure command.
6957# ## Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
70- if ($this.Version -lt " 3.7.0" ) {
71- $env: LDFLAGS = " -L/usr/local/opt/openssl@3/lib -L/usr/local/opt/zlib/lib"
72- $env: CFLAGS = " -I/usr/local/opt/openssl@3/include -I/usr/local/opt/zlib/include"
73- }else {
74- $configureString += " --with-openssl=/usr/local/opt/openssl@3"
75-
76- # For Python 3.7.2 and 3.7.3 we need to provide PATH for zlib to pack it properly. Otherwise the build will fail
77- # with the error: zipimport.ZipImportError: can't decompress data; zlib not available
78- if ($this.Version -eq " 3.7.2" -or $this.Version -eq " 3.7.3" -or $this.Version -eq " 3.7.17" ) {
79- $env: LDFLAGS = " -L/usr/local/opt/zlib/lib"
80- $env: CFLAGS = " -I/usr/local/opt/zlib/include"
81- }
82-
83- # if ($this.Version -gt "3.7.12") {
84- $configureString += " --with-tcltk-includes='-I /usr/local/opt/tcl-tk/include/tcl-tk' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
85- # }
86-
87- if ($this.Version -eq " 3.7.17" ) {
88- $env: LDFLAGS += " -L$ ( brew-- prefix bzip2) /lib -L$ ( brew-- prefix readline) /lib -L$ ( brew-- prefix ncurses) /lib"
89- $env: CFLAGS += " -I$ ( brew-- prefix bzip2) /include -I$ ( brew-- prefix readline) /include -I$ ( brew-- prefix ncurses) /include"
90- }
91- }
58+ $configureString += " --with-openssl=/usr/local/opt/openssl@3"
59+ $configureString += " --with-tcltk-includes='-I /usr/local/opt/tcl-tk/include/tcl-tk' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
9260
93- # ## Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
61+ # ## Compile with support of loadable sqlite extensions.
9462# ## Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
95- if ($this.Version -ge " 3.2.0" ) {
96- $configureString += " --enable-loadable-sqlite-extensions"
97- $env: LDFLAGS += " -L$ ( brew-- prefix sqlite3) /lib"
98- $env: CFLAGS += " -I$ ( brew-- prefix sqlite3) /include"
99- $env: CPPFLAGS += " -I$ ( brew-- prefix sqlite3) /include"
100- }
63+ $configureString += " --enable-loadable-sqlite-extensions"
64+ $env: LDFLAGS += " -L$ ( brew-- prefix sqlite3) /lib"
65+ $env: CFLAGS += " -I$ ( brew-- prefix sqlite3) /include"
66+ $env: CPPFLAGS += " -I$ ( brew-- prefix sqlite3) /include"
10167
10268Write-Host " The passed configure options are:"
10369Write-Host $configureString