summaryrefslogtreecommitdiffstats
path: root/Tools/freeze
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-12-22 10:16:59 (GMT)
committerGitHub <noreply@github.com>2023-12-22 10:16:59 (GMT)
commit706b40e8924fab9c433f26810d228f0188c864b5 (patch)
tree89fca2ca1203447de4d1efe37ea9158bf4fb2edd /Tools/freeze
parenta39131ed8c3dd7a1bfc375fc4f38a9e2eb489636 (diff)
downloadcpython-706b40e8924fab9c433f26810d228f0188c864b5.zip
cpython-706b40e8924fab9c433f26810d228f0188c864b5.tar.gz
cpython-706b40e8924fab9c433f26810d228f0188c864b5.tar.bz2
[3.11] gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) (#113361)
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 df1eec3dae3b1eddff819fd70f58b03b3fbd0eda) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Tools/freeze')
-rw-r--r--Tools/freeze/README5
-rwxr-xr-xTools/freeze/freeze.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/Tools/freeze/README b/Tools/freeze/README
index 098107c..18815fa 100644
--- a/Tools/freeze/README
+++ b/Tools/freeze/README
@@ -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
-----
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index bc5e43f..de97727 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -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