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:
Carlo Cabrera 2021-06-28 19:37:11 -07:00 committed by GitHub
commit 04532cb621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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|

View File

@ -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