Skip to content

Commit 452e411

Browse files
ronaldoussorenerlend-aasland
authored andcommitted
pythongh-65701: document that freeze doesn't work with framework builds on macOS (python#113352)
* pythongh-65701: document that freeze doesn't work with framework builds on macOS The framework install is inherently incompatible with freeze. Document that that freeze doesn't work with framework builds and bail out early when trying to run freeze anyway. Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 7f3f86e commit 452e411

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The :program:`freeze` tool doesn't work with framework builds of Python.
2+
Document this and bail out early when running the tool with such a build.

Tools/freeze/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ source tree).
218218
It is possible to create frozen programs that don't have a console
219219
window, by specifying the option '-s windows'. See the Usage below.
220220

221+
Usage under macOS
222+
-----------------
223+
224+
On macOS the freeze tool is not supported for framework builds.
225+
221226
Usage
222227
-----
223228

Tools/freeze/freeze.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ def main():
136136
makefile = 'Makefile'
137137
subsystem = 'console'
138138

139+
if sys.platform == "darwin" and sysconfig.get_config_var("PYTHONFRAMEWORK"):
140+
print(f"{sys.argv[0]} cannot be used with framework builds of Python", file=sys.stderr)
141+
sys.exit(1)
142+
143+
139144
# parse command line by first replacing any "-i" options with the
140145
# file contents.
141146
pos = 1

0 commit comments

Comments
 (0)