Skip to content

Commit

Permalink
python-freethreading: fix conflict with [email protected] on Linux
Browse files Browse the repository at this point in the history
This doesn't conflict with `[email protected]` on macOS, but I overlooked some
files on Linux.

See discussion at #196341.
  • Loading branch information
carlocab committed Nov 1, 2024
1 parent 55312e6 commit 25a9806
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Formula/p/python-freethreading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class PythonFreethreading < Formula
depends_on "sqlite"
depends_on "xz"

# not actually used, we just want this installed to ensure there are no conflicts.
uses_from_macos "python" => :test
uses_from_macos "bzip2"
uses_from_macos "expat"
uses_from_macos "libedit"
Expand Down Expand Up @@ -279,8 +281,10 @@ def install
mv bin/"idle#{version.major_minor}", bin/"idle#{version.major_minor}t"
mv bin/"pydoc#{version.major_minor}", bin/"pydoc#{version.major_minor}t"

# Remove python3.13 named executables
(bin.children - bin.glob("*#{version.major_minor}t*")).map(&:unlink)
# Remove files that conflict with the main python3 formula
[bin, lib, lib/"pkgconfig", include].each do |directory|
(directory.glob("*python*") - directory.glob("*#{version.major_minor}t*")).map(&:unlink)
end
rm_r share
end

Expand Down

0 comments on commit 25a9806

Please sign in to comment.