From db6d3156f2e9fad934cf9644f93780133dbe7937 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Mon, 19 Dec 2022 23:25:53 -0800 Subject: [PATCH] python: reinstate pip's `--no-binary` --- Library/Homebrew/language/python.rb | 3 ++- .../Homebrew/test/language/python/virtualenv_spec.rb | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 8087bbe9ed..c0df766d43 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -304,7 +304,8 @@ module Language def do_install(targets) targets = Array(targets) @formula.system @venv_root/"bin/pip", "install", - "-v", "--no-deps", "--use-feature=no-binary-enable-wheel-cache", + "-v", "--no-deps", "--no-binary", ":all:", + "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", *targets end end diff --git a/Library/Homebrew/test/language/python/virtualenv_spec.rb b/Library/Homebrew/test/language/python/virtualenv_spec.rb index 52c28f91f5..c49decda29 100644 --- a/Library/Homebrew/test/language/python/virtualenv_spec.rb +++ b/Library/Homebrew/test/language/python/virtualenv_spec.rb @@ -24,7 +24,7 @@ describe Language::Python::Virtualenv::Virtualenv, :needs_python do describe "#pip_install" do it "accepts a string" do expect(formula).to receive(:system) - .with(dir/"bin/pip", "install", "-v", "--no-deps", + .with(dir/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", "foo") .and_return(true) virtualenv.pip_install "foo" @@ -32,7 +32,7 @@ describe Language::Python::Virtualenv::Virtualenv, :needs_python do it "accepts a multi-line strings" do expect(formula).to receive(:system) - .with(dir/"bin/pip", "install", "-v", "--no-deps", + .with(dir/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", "foo", "bar") .and_return(true) @@ -44,12 +44,12 @@ describe Language::Python::Virtualenv::Virtualenv, :needs_python do it "accepts an array" do expect(formula).to receive(:system) - .with(dir/"bin/pip", "install", "-v", "--no-deps", + .with(dir/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", "foo") .and_return(true) expect(formula).to receive(:system) - .with(dir/"bin/pip", "install", "-v", "--no-deps", + .with(dir/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", "bar") .and_return(true) @@ -61,7 +61,7 @@ describe Language::Python::Virtualenv::Virtualenv, :needs_python do expect(res).to receive(:stage).and_yield expect(formula).to receive(:system) - .with(dir/"bin/pip", "install", "-v", "--no-deps", + .with(dir/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", "--use-feature=no-binary-enable-wheel-cache", "--ignore-installed", Pathname.pwd) .and_return(true)