Skip to content

[3.11] gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) #113361

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
Dec 22, 2023
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,2 @@
The :program:`freeze` tool doesn't work with framework builds of Python.
Document this and bail out early when running the tool with such a build.
5 changes: 5 additions & 0 deletions Tools/freeze/README
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ source tree).
It is possible to create frozen programs that don't have a console
window, by specifying the option '-s windows'. See the Usage below.

Usage under macOS
-----------------

On macOS the freeze tool is not supported for framework builds.

Usage
-----

Expand Down
5 changes: 5 additions & 0 deletions Tools/freeze/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ def main():
makefile = 'Makefile'
subsystem = 'console'

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)
sys.exit(1)


# parse command line by first replacing any "-i" options with the
# file contents.
pos = 1
Expand Down