Skip to content

Commit

Permalink
fixup! sysconfig: make _sysconfigdata.py relocatable
Browse files Browse the repository at this point in the history
Use `sys.base_prefix` for sysconfig relocation
Previously, we were using `sys.prefix` for relocation, which is
not right as it may change for virtualenvs. `sys.base_prefix` is
the right variable to use.
  • Loading branch information
naveen521kk committed Nov 7, 2023
1 parent f8ce319 commit e66e4f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def _generate_posix_vars():
for key in keys_to_replace:
value = build_time_vars[key]
build_time_vars[key] = value.replace(prefix, sys.prefix)
build_time_vars[key] = value.replace(prefix, sys.base_prefix)
"""

with open(destfile, 'w', encoding='utf8') as f:
Expand Down

0 comments on commit e66e4f7

Please sign in to comment.