Skip to content

Commit

Permalink
libpython-tabulate: use Python's libexec/"bin" (#107662)
Browse files Browse the repository at this point in the history
Needed for #107517.
  • Loading branch information
carlocab authored Aug 10, 2022
1 parent fb3da50 commit 51a88a0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Formula/libpython-tabulate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ class LibpythonTabulate < Formula

def pythons
deps.map(&:to_formula)
.select { |f| f.name.match?(/python@\d\.\d+/) }
.map(&:opt_bin)
.map { |bin| bin/"python3" }
.select { |f| f.name.match?(/^python@\d\.\d+$/) }
.map { |f| f.opt_libexec/"bin/python" }
end

def install
pythons.each do |python|
system python, *Language::Python.setup_install_args(prefix),
"--install-lib=#{prefix/Language::Python.site_packages(python)}"
system python, *Language::Python.setup_install_args(prefix, python)
end

# Remove bin folder, use tabulate from the python-tabulate formula instead.
# This is necessary to keep all the Python versions as build/test
# dependencies only for the libpython-tabulate
Expand Down

0 comments on commit 51a88a0

Please sign in to comment.