@@ -29,19 +29,31 @@ class macOSPythonBuilder : NixPythonBuilder {
2929 #>
3030
3131 $pythonBinariesLocation = $this.GetFullPythonToolcacheLocation ()
32- $configureString = " ./configure --prefix=$pythonBinariesLocation --enable-optimizations --enable-shared --with-lto"
32+ $configureString = " ./configure"
33+ $configureString += " --prefix=$pythonBinariesLocation "
34+ $configureString += " --enable-optimizations"
35+ $configureString += " --enable-shared"
36+ $configureString += " --with-lto"
3337
3438 # ## OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
3539 # ## Solution is to install these libraries from a third-party package manager,
3640 # ## and then add the appropriate paths for the header and library files to configure command.
3741 # ## Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
3842 if ($this.Version -lt " 3.7.0" ) {
39- $env: LDFLAGS = " -L$ ( brew -- prefix openssl) /lib"
40- $env: CFLAGS = " -I$ ( brew -- prefix openssl) /include"
43+ $env: LDFLAGS = " -L$ ( brew -- prefix openssl) /lib"
44+ $env: CFLAGS = " -I$ ( brew -- prefix openssl) /include"
4145 } else {
4246 $configureString += " --with-openssl=/usr/local/opt/openssl"
4347 }
4448
49+ # ## Compile with support of loadable sqlite extensions. Unavailable for Python 2.*
50+ # ## Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
51+ if ($this.Version -ge " 3.2.0" ) {
52+ $configureString += " --enable-loadable-sqlite-extensions"
53+ $env: LDFLAGS += " -L$ ( brew -- prefix sqlite3) /lib"
54+ $env: CFLAGS += " -I$ ( brew -- prefix sqlite3) /include"
55+ }
56+
4557 Execute- Command - Command $configureString
4658 }
4759
0 commit comments