mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-45402: Fix test_tools.test_sundry() (GH-28786)
Fix test_tools.test_sundry() when Python is built out of tree: fix how the freeze_modules.py tool locates the _freeze_module program.
This commit is contained in:
parent
32485cecab
commit
ff8859d965
2 changed files with 7 additions and 3 deletions
|
@ -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.
|
|
@ -29,9 +29,10 @@ MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'frozen_modules')
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
|
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
|
||||||
if not os.path.isfile(TOOL):
|
if not os.path.isfile(TOOL):
|
||||||
# When building out of the source tree, get the tool from the current
|
# When building out of the source tree, get the tool from directory
|
||||||
# directory
|
# of the Python executable
|
||||||
TOOL = os.path.join('Programs', '_freeze_module')
|
TOOL = os.path.dirname(sys.executable)
|
||||||
|
TOOL = os.path.join(TOOL, 'Programs', '_freeze_module')
|
||||||
TOOL = os.path.abspath(TOOL)
|
TOOL = os.path.abspath(TOOL)
|
||||||
if not os.path.isfile(TOOL):
|
if not os.path.isfile(TOOL):
|
||||||
sys.exit("ERROR: missing _freeze_module")
|
sys.exit("ERROR: missing _freeze_module")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue