Skip to content

Commit d8825c2

Browse files
miss-islingtonronaldoussorenerlend-aasland
authored
[3.12] gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) (#113362)
gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) * gh-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. (cherry picked from commit df1eec3) Co-authored-by: Ronald Oussoren <[email protected]> Co-authored-by: Erlend E. Aasland <[email protected]>
1 parent 2ddee2e commit d8825c2

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
@@ -222,6 +222,11 @@ source tree).
222222
It is possible to create frozen programs that don't have a console
223223
window, by specifying the option '-s windows'. See the Usage below.
224224

225+
Usage under macOS
226+
-----------------
227+
228+
On macOS the freeze tool is not supported for framework builds.
229+
225230
Usage
226231
-----
227232

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)