Skip to content

Commit

Permalink
feat: support --disable-gil by hacking the arch string
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed May 19, 2024
1 parent 7859201 commit cc447a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builders/ubuntu-python-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class UbuntuPythonBuilder : NixPythonBuilder {
Execute configure script with required parameters.
#>

$archParts = $this.Architecture.Split("-")

$pythonBinariesLocation = $this.GetFullPythonToolcacheLocation()

### To build Python with SO we must pass full path to lib folder to the linker
Expand All @@ -36,6 +38,10 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$configureString += " --prefix=$pythonBinariesLocation"
$configureString += " --enable-shared"
$configureString += " --enable-optimizations"
if ($archParts.contains("nogil) {
$configureString += " --disable-gil"
}
### Compile with support of loadable sqlite extensions.
### Link to documentation (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension)
Expand Down

0 comments on commit cc447a9

Please sign in to comment.