Add support for free-threaded Python (#2995)

This commit is contained in:
Sam Gross 2024-06-27 16:18:14 -04:00 committed by GitHub
parent 7947efc130
commit d660c5a84f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 0 deletions

View file

@ -822,6 +822,7 @@ build_package_standard_build() {
use_homebrew_zlib || true
fi
use_dsymutil || true
use_free_threading || true
fi
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
@ -1761,6 +1762,12 @@ use_dsymutil() {
fi
}
use_free_threading() {
if [[ -n "$PYTHON_BUILD_FREE_THREADING" ]]; then
package_option python configure --disable-gil
fi
}
build_package_enable_shared() {
package_option python configure --enable-shared
}

View file

@ -0,0 +1,2 @@
export PYTHON_BUILD_FREE_THREADING=1
source "$(dirname "${BASH_SOURCE[0]}")"/3.13-dev

View file

@ -0,0 +1,2 @@
export PYTHON_BUILD_FREE_THREADING=1
source "$(dirname "${BASH_SOURCE[0]}")"/3.14-dev