From 425535e32b3bfd3d449c3a1d34c942322d014f36 Mon Sep 17 00:00:00 2001 From: Dustin Rodrigues Date: Fri, 8 Jan 2021 23:02:59 -0500 Subject: [PATCH] python: add --no-user when doing pip install --- Library/Homebrew/language/python.rb | 2 +- Library/Homebrew/test/language/python_spec.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb index 8598dc996e..9e12305926 100644 --- a/Library/Homebrew/language/python.rb +++ b/Library/Homebrew/language/python.rb @@ -287,7 +287,7 @@ module Language targets = Array(targets) @formula.system @venv_root/"bin/pip", "install", "-v", "--no-deps", "--no-binary", ":all:", - "--ignore-installed", *targets + "--no-user", "--ignore-installed", *targets end end end diff --git a/Library/Homebrew/test/language/python_spec.rb b/Library/Homebrew/test/language/python_spec.rb index e328e42b04..c3eb423ee2 100644 --- a/Library/Homebrew/test/language/python_spec.rb +++ b/Library/Homebrew/test/language/python_spec.rb @@ -96,7 +96,7 @@ describe Language::Python::Virtualenv::Virtualenv do it "accepts a string" do expect(formula).to receive(:system) .with(dir/"bin/pip", "install", "-v", "--no-deps", - "--no-binary", ":all:", "--ignore-installed", "foo") + "--no-binary", ":all:", "--no-user", "--ignore-installed", "foo") .and_return(true) subject.pip_install "foo" end @@ -104,7 +104,7 @@ describe Language::Python::Virtualenv::Virtualenv do it "accepts a multi-line strings" do expect(formula).to receive(:system) .with(dir/"bin/pip", "install", "-v", "--no-deps", - "--no-binary", ":all:", "--ignore-installed", "foo", "bar") + "--no-binary", ":all:", "--no-user", "--ignore-installed", "foo", "bar") .and_return(true) subject.pip_install <<~EOS @@ -116,12 +116,12 @@ describe Language::Python::Virtualenv::Virtualenv do it "accepts an array" do expect(formula).to receive(:system) .with(dir/"bin/pip", "install", "-v", "--no-deps", - "--no-binary", ":all:", "--ignore-installed", "foo") + "--no-binary", ":all:", "--no-user", "--ignore-installed", "foo") .and_return(true) expect(formula).to receive(:system) .with(dir/"bin/pip", "install", "-v", "--no-deps", - "--no-binary", ":all:", "--ignore-installed", "bar") + "--no-binary", ":all:", "--no-user", "--ignore-installed", "bar") .and_return(true) subject.pip_install ["foo", "bar"] @@ -133,7 +133,7 @@ describe Language::Python::Virtualenv::Virtualenv do expect(res).to receive(:stage).and_yield expect(formula).to receive(:system) .with(dir/"bin/pip", "install", "-v", "--no-deps", - "--no-binary", ":all:", "--ignore-installed", Pathname.pwd) + "--no-binary", ":all:", "--no-user", "--ignore-installed", Pathname.pwd) .and_return(true) subject.pip_install res