Merge pull request #11611 from carlocab/venv-system-site-packages
language/python: create venvs with access to system site packages
This commit is contained in:
commit
04532cb621
@ -218,7 +218,7 @@ module Language
|
||||
def create
|
||||
return if (@venv_root/"bin/python").exist?
|
||||
|
||||
@formula.system @python, "-m", "venv", @venv_root
|
||||
@formula.system @python, "-m", "venv", "--system-site-packages", @venv_root
|
||||
|
||||
# Robustify symlinks to survive python patch upgrades
|
||||
@venv_root.find do |f|
|
||||
|
||||
@ -15,7 +15,7 @@ describe Language::Python::Virtualenv::Virtualenv, :needs_python do
|
||||
|
||||
describe "#create" do
|
||||
it "creates a venv" do
|
||||
expect(formula).to receive(:system).with("python", "-m", "venv", dir)
|
||||
expect(formula).to receive(:system).with("python", "-m", "venv", "--system-site-packages", dir)
|
||||
virtualenv.create
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user