Closed
Description
Bug report
Bug description:
I've been messing around with the Mac framework build and encountered a failing test_tools.test_freeze
. It runs Tools/freeze/freeze.py
which has this buried in it:
if sys.platform == "darwin" and sysconfig.get_config_var("PYTHONFRAMEWORK"):
print(f"{sys.argv[0]} cannot be used with framework builds of Python", file=sys.stderr)
That seems like the wrong way to skip the test, but I suppose it's useful if run from the command line. Based on a comment @ned-deily made in another issue, that might be better expressed as:
if sys.platform == "darwin" and sys._framework:
print(f"{sys.argv[0]} cannot be used with framework builds of Python",
file=sys.stderr)
That said, test_tools/test_freeze.py
should perhaps skip the test on Darwin framework builds with something like this:
diff --git a/Lib/test/test_tools/test_freeze.py b/Lib/test/test_tools/test_freeze.py
index 671ec2961e..4d3f7e1a76 100644
--- a/Lib/test/test_tools/test_freeze.py
+++ b/Lib/test/test_tools/test_freeze.py
@@ -14,6 +14,8 @@
@support.requires_zlib()
@unittest.skipIf(sys.platform.startswith('win'), 'not supported on Windows')
+@unittest.skipIf(sys.platform == "darwin" and sys._framework,
+ 'not supported on Mac framework builds')
@support.skip_if_buildbot('not all buildbots have enough space')
# gh-103053: Skip test if Python is built with Profile Guided Optimization
# (PGO), since the test is just too slow in this case.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS