summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2023-12-21 15:28:00 (GMT)
committerGitHub <noreply@github.com>2023-12-21 15:28:00 (GMT)
commitdf1eec3dae3b1eddff819fd70f58b03b3fbd0eda (patch)
tree0bad3e9b0d701008d8a950122d90325173bb44b1
parent526d0a9b6eafb95c425838715a4961d97dc600da (diff)
downloadcpython-df1eec3dae3b1eddff819fd70f58b03b3fbd0eda.zip
cpython-df1eec3dae3b1eddff819fd70f58b03b3fbd0eda.tar.gz
cpython-df1eec3dae3b1eddff819fd70f58b03b3fbd0eda.tar.bz2
gh-65701: document that freeze doesn't work with framework builds on macOS (#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. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
-rw-r--r--Misc/NEWS.d/next/macOS/2023-12-21-10-20-41.gh-issue-65701.Q2hNbN.rst2
-rw-r--r--Tools/freeze/README5
-rwxr-xr-xTools/freeze/freeze.py5
3 files changed, 12 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/macOS/2023-12-21-10-20-41.gh-issue-65701.Q2hNbN.rst b/Misc/NEWS.d/next/macOS/2023-12-21-10-20-41.gh-issue-65701.Q2hNbN.rst
new file mode 100644
index 0000000..870b84a
--- /dev/null
+++ b/Misc/NEWS.d/next/macOS/2023-12-21-10-20-41.gh-issue-65701.Q2hNbN.rst
@@ -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.
diff --git a/Tools/freeze/README b/Tools/freeze/README
index 9b3ea1f..516077b 100644
--- a/Tools/freeze/README
+++ b/Tools/freeze/README
@@ -218,6 +218,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