Skip to content

bpo-45402: Fix test_tools.test_sundry() #28786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix test_tools.test_sundry() when Python is built out of tree: fix how
the freeze_modules.py tool locates the _freeze_module program.
Patch by Victor Stinner.
7 changes: 4 additions & 3 deletions Tools/scripts/freeze_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
if sys.platform != "win32":
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
if not os.path.isfile(TOOL):
# When building out of the source tree, get the tool from the current
# directory
TOOL = os.path.join('Programs', '_freeze_module')
# When building out of the source tree, get the tool from directory
# of the Python executable
TOOL = os.path.dirname(sys.executable)
TOOL = os.path.join(TOOL, 'Programs', '_freeze_module')
TOOL = os.path.abspath(TOOL)
if not os.path.isfile(TOOL):
sys.exit("ERROR: missing _freeze_module")
Expand Down