Skip to content

Commit

Permalink
Force loading the native sysconfigdata in distutils.sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 28, 2024
1 parent dc70ae8 commit 1d77d63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions patch/Python/sitecustomize.iOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def link(*args, **kwargs):
for tool in ["ar", "as", "cc", "cxx", "ld"]:
os.environ[tool.upper()] = DISABLED_COMPILER_ERROR.replace(" ", "_")

# Although we're building for {{os}}, we need to tell distutils.sysconfig
# to load the *native* sysconfigdata.
os.environ["_PYTHON_SYSCONFIGDATA_NAME"] = "_sysconfigdata__darwin_darwin"

# Call the next sitecustomize script if there is one
# (https://nedbatchelder.com/blog/201001/running_code_at_python_startup.html).
Expand Down

0 comments on commit 1d77d63

Please sign in to comment.