Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Packaging} Install pip in Homebrew virtual env #27186

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/release/homebrew/docker/formula_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def update_formula() -> str:
upstream_sha = compute_sha256(HOMEBREW_UPSTREAM_URL)
text = re.sub('sha256 ".*"', 'sha256 "{}"'.format(upstream_sha), text, 1)
text = re.sub('.*revision.*\n', '', text, 1) # remove revision for previous version if exists

# include pip when creating venv, see https://github.com/Azure/azure-cli/issues/27047
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It the link incorrect? #27047 doesn't seem to be related to pip in a venv.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to homebrew pr link: Homebrew/brew#15792

# this can be removed after Homebrew merges our PR
text = re.sub('system_site_packages: false', 'system_site_packages: false, without_pip: false', text, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As formula_generate.py always updates the formula on Homebrew side, it requires a weird process that we always need 2 separate PRs:

  1. one to make the change,
  2. once the change is merged to Homebrew side's formula, one without the change

An alternative I can think of is to directly submit a PR to https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/azure-cli.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to manually fix here as Homebrew pipeline is broken now.
Creating PR to homebrew is more convenient.


pack = None
packs_to_remove = set()
lines = text.split('\n')
Expand Down