Skip to content

Commit 819840c

Browse files
committed
python-freethreading: remove CLT requirement
This seems to no longer be needed. See #196805. While we're here, let's fix up some of these heredoc delimiters.
1 parent 5af0b84 commit 819840c

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

Formula/p/python-freethreading.rb

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ class PythonFreethreading < Formula
1919
sha256 x86_64_linux: "6daceb67da4ef3b087c9e46f636b42632261380bb971208d6e747c878d835a77"
2020
end
2121

22-
# setuptools remembers the build flags python is built with and uses them to
23-
# build packages later. Xcode-only systems need different flags.
24-
pour_bottle? only_if: :clt_installed
25-
2622
depends_on "pkg-config" => :build
2723
depends_on "mpdecimal"
2824
depends_on "openssl@3"
@@ -142,13 +138,6 @@ def install
142138
cppflags = ["-I#{HOMEBREW_PREFIX}/include"]
143139

144140
if OS.mac?
145-
if MacOS.sdk_path_if_needed
146-
# Help Python's build system (setuptools/pip) to build things on SDK-based systems
147-
# The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot)
148-
cflags << "-isysroot #{MacOS.sdk_path}"
149-
ldflags << "-isysroot #{MacOS.sdk_path}"
150-
end
151-
152141
# Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC
153142
# install does not match the one in CI _exactly_ (major and minor version).
154143
# https://github.com/orgs/Homebrew/discussions/3734
@@ -348,7 +337,7 @@ def post_install
348337
# Mark Homebrew python as externally managed: https://peps.python.org/pep-0668/#marking-an-interpreter-as-using-an-external-package-manager
349338
# Placed after ensurepip since it invokes pip in isolated mode, meaning
350339
# we can't pass --break-system-packages.
351-
(lib_cellar/"EXTERNALLY-MANAGED").write <<~EOS
340+
(lib_cellar/"EXTERNALLY-MANAGED").write <<~PYTHON
352341
[externally-managed]
353342
Error=To install Python packages system-wide, try brew install
354343
xyz, where xyz is the package you are trying to
@@ -377,11 +366,11 @@ def post_install
377366
file. Failure to do this can result in a broken Homebrew installation.
378367
379368
Read more about this behavior here: <https://peps.python.org/pep-0668/>
380-
EOS
369+
PYTHON
381370
end
382371

383372
def sitecustomize
384-
<<~EOS
373+
<<~PYTHON
385374
# This file is created by Homebrew and is executed on each python startup.
386375
# Don't print from here, or else python command line scripts may fail!
387376
# <https://docs.brew.sh/Homebrew-and-Python>
@@ -434,7 +423,7 @@ def sitecustomize
434423
split_prefix = f"#{HOMEBREW_PREFIX}/opt/python-{split_module}@#{version.major_minor}t/libexec"
435424
if os.path.isdir(split_prefix):
436425
sys.path.append(split_prefix)
437-
EOS
426+
PYTHON
438427
end
439428

440429
def caveats
@@ -472,7 +461,7 @@ def caveats
472461
shell_output("#{python3} -Sc 'import dbm.gnu' 2>&1", 1)
473462

474463
# Verify that the selected DBM interface works
475-
(testpath/"dbm_test.py").write <<~EOS
464+
(testpath/"dbm_test.py").write <<~PYTHON
476465
import dbm
477466
478467
with dbm.ndbm.open("test", "c") as db:
@@ -481,7 +470,7 @@ def caveats
481470
assert list(db.keys()) == [b"foo \\xbd"]
482471
assert b"foo \\xbd" in db
483472
assert db[b"foo \\xbd"] == b"bar \\xbd"
484-
EOS
473+
PYTHON
485474
system python3, "dbm_test.py"
486475

487476
system bin/"pip#{version.major_minor}t", "list", "--format=columns"

0 commit comments

Comments
 (0)