Skip to content

brew install into a virtualenv #8689

@marstr

Description

@marstr

Our homebrew formula installs az using system python without a virtual environment. This is causing issues for folks who have existing non-hombrew python installs, or use system Python for their projects.

We should isolate the CLI into its own virtual environment, the way the bash install script does. It'll also allow us to fix this logic:

(bin/"az").write <<~EOS
#!/usr/bin/env bash
export PYTHONPATH="#{ENV["PYTHONPATH"]}"
if command -v python#{xy} >/dev/null 2>&1; then
python#{xy} -m azure.cli \"$@\"
else
python3 -m azure.cli \"$@\"
fi
EOS

Which is getting confused on systems where python3.x is available, but not where the azure-cli was installed. (Folks setting it up in a virtualenv by themselves.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions