Skip to content

Commit

Permalink
hooks: update sysconfig hook (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotduarte authored Jul 17, 2023
1 parent cf502ea commit 1b681c3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cx_Freeze/hooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,13 @@ def load_ssl(finder: ModuleFinder, module: Module) -> None:

def load_sysconfig(finder: ModuleFinder, module: Module) -> None:
"""The sysconfig module implicitly loads _sysconfigdata."""
if IS_WINDOWS:
return
get_data_name = getattr(sysconfig, "_get_sysconfigdata_name", None)
if get_data_name is None:
datafile = "_sysconfigdata"
else:
if not hasattr(sys, "abiflags"):
sys.abiflags = ""
datafile = get_data_name()
finder.include_module(datafile)
return
with suppress(ImportError):
finder.include_module(get_data_name())


def load_tensorflow(finder: ModuleFinder, module: Module) -> None:
Expand Down

0 comments on commit 1b681c3

Please sign in to comment.