@@ -29,19 +29,31 @@ class macOSPythonBuilder : NixPythonBuilder {
29
29
#>
30
30
31
31
$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"
33
37
34
38
# ## OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL.
35
39
# ## Solution is to install these libraries from a third-party package manager,
36
40
# ## and then add the appropriate paths for the header and library files to configure command.
37
41
# ## Link to documentation (https://cpython-devguide.readthedocs.io/setup/#build-dependencies)
38
42
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"
41
45
} else {
42
46
$configureString += " --with-openssl=/usr/local/opt/openssl"
43
47
}
44
48
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
+
45
57
Execute- Command - Command $configureString
46
58
}
47
59
0 commit comments