From 62a1cae50465e31428f6c7de3c042f24cdb1b5f2 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 11 Aug 2022 00:26:38 +0800 Subject: [PATCH] numpy: use Python's `libexec/"bin"` (#107664) Needed for #107517. --- Formula/numpy.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Formula/numpy.rb b/Formula/numpy.rb index 703161ee0d914..418de7178d2fb 100644 --- a/Formula/numpy.rb +++ b/Formula/numpy.rb @@ -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 @@ -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