Skip to content

Commit

Permalink
fix abi_thread check
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotduarte committed Dec 30, 2024
1 parent d81b59e commit 5bf9817
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cx_Freeze/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def base(self, name: str | Path | None) -> None:
version = sys.version_info[:2]
if (
version <= (3, 13)
and get_config_var("abi_thread") is None
and (get_config_var("abi_thread") or "") == ""
and not (IS_MACOS and version == (3, 13))
):
name = name or "console_legacy"
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def get_extensions() -> list[Extension]:
os.environ.get("CI", "") != "true"
or os.environ.get("CIBUILDWHEEL", "0") != "1"
)
abi_thread = get_config_var("abi_thread")
abi_thread = get_config_var("abi_thread") or ""
version = sys.version_info[:2]
extensions = [
Extension(
Expand All @@ -287,7 +287,7 @@ def get_extensions() -> list[Extension]:
]
if (
version <= (3, 13)
and abi_thread is None
and abi_thread == ""
and not (IS_MACOS and version == (3, 13))
):
extensions += [
Expand All @@ -299,7 +299,7 @@ def get_extensions() -> list[Extension]:
)
]
if IS_MINGW or IS_WINDOWS:
if version <= (3, 13) and abi_thread is None:
if version <= (3, 13) and abi_thread == "":
extensions += [
Extension(
"cx_Freeze.bases.Win32GUI",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_executables.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_executables(
]
if (
sys.version_info[:2] <= (3, 13)
and get_config_var("abi_thread") is None
and (get_config_var("abi_thread") or "") == ""
and not (IS_MACOS and sys.version_info[:2] == (3, 13))
):
TEST_VALID_PARAMETERS += [
Expand Down

0 comments on commit 5bf9817

Please sign in to comment.