Skip to content

Commit 4a2f2da

Browse files
authored
Merge pull request #196810 from Homebrew/python-freethreading-clit
python-freethreading: remove CLT requirement
2 parents 5af0b84 + f103aa3 commit 4a2f2da

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

Formula/p/python-freethreading.rb

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@ class PythonFreethreading < Formula
1010
end
1111

1212
bottle do
13-
rebuild 2
14-
sha256 arm64_sequoia: "32d7f7f0e2656048b58b2ddde7cc64bd1c89ecad3bf055d67ffc54bfd65cd488"
15-
sha256 arm64_sonoma: "f4cbdc28c038b51c8a010483c0c3f8e0a3f268c77821878a2ea3362ecd227a9e"
16-
sha256 arm64_ventura: "756128eb32481fdca1d3c5251bf85428aa46829503ecea8265e7bcf11e4ec51b"
17-
sha256 sonoma: "bda3183a044054bb71e716806c25d94409bba2959c9fa8363a8a26dd719e7128"
18-
sha256 ventura: "2eb3d08648994751b0adb9e51ff8279f8084b230fb787db1e3ea80b2f42189a3"
19-
sha256 x86_64_linux: "6daceb67da4ef3b087c9e46f636b42632261380bb971208d6e747c878d835a77"
13+
rebuild 3
14+
sha256 arm64_sequoia: "a042fee9b1a8365594b2d7d3ceb301f6e2ae2fdb905f2739e522c1c76ec90514"
15+
sha256 arm64_sonoma: "9912054d2a8e93d4f9c5de192b62457916a6f83025aa146986b7ae6ef2ba49c3"
16+
sha256 arm64_ventura: "713a261152ec34bbb0c52493dc88b6fef1120b5b923ba05c5af2858d02dc08de"
17+
sha256 sonoma: "f67bfb69abf1b1431be36831c218bc60c4d3765a7dc614cfc3bef57ce2625c4c"
18+
sha256 ventura: "1f5cf3c29f401ae75f796457c9f6253f59fedb23c368789db3835b70bccf2cb3"
19+
sha256 x86_64_linux: "16860c5c2990ba76679f67ffc08142ee3c0df759caac776abcd69d61a43cc036"
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)