Skip to content

Commit

Permalink
numpy: use Python's libexec/"bin" (#107664)
Browse files Browse the repository at this point in the history
Needed for #107517.
  • Loading branch information
carlocab authored Aug 10, 2022
1 parent 51a88a0 commit 62a1cae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Formula/numpy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ class Numpy < Formula

def pythons
deps.map(&:to_formula)
.select { |f| f.name.match?(/python@\d\.\d+/) }
.select { |f| f.name.match?(/^python@\d\.\d+$/) }
.sort_by(&:version) # so that `bin/f2py` and `bin/f2py3` use python3.10
.map(&:opt_bin)
.map { |bin| bin/"python3" }
.map { |f| f.opt_libexec/"bin/python" }
end

def install
Expand All @@ -52,8 +51,7 @@ def install

system python, "setup.py", "build", "--fcompiler=#{Formula["gcc"].opt_bin}/gfortran",
"--parallel=#{ENV.make_jobs}"
system python, *Language::Python.setup_install_args(prefix),
"--install-lib=#{prefix/site_packages}"
system python, *Language::Python.setup_install_args(prefix, python)
end
end

Expand Down

0 comments on commit 62a1cae

Please sign in to comment.