Skip to content

📦 fix(ci): uv 📦#17

Merged
alkalescent merged 3 commits intomasterfrom
fix/brew-uv
Feb 21, 2026
Merged

📦 fix(ci): uv 📦#17
alkalescent merged 3 commits intomasterfrom
fix/brew-uv

Conversation

@alkalescent
Copy link
Owner

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @alkalescent, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the Homebrew formula template to switch from using pip to uv for managing Python dependencies. The change streamlines the package installation workflow by leveraging uv's capabilities for creating virtual environments and syncing project dependencies, aiming for improved efficiency and consistency in formula builds.

Highlights

  • Dependency Management: Migrated the Python package installation process from pip to uv within Homebrew formula templates.
  • Build Process Refinement: Refactored the install method in the formula template to utilize uv for virtual environment creation and dependency synchronization, including setting the UV_PROJECT_ENVIRONMENT.
  • New Build Dependency: Introduced uv as a build dependency for Homebrew formulas to enable its use in the installation process.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .github/templates/formula.rb.template
    • Added depends_on "uv" => :build to include uv as a build dependency.
    • Replaced the python3 -m venv command with setting ENV["UV_PROJECT_ENVIRONMENT"] to point uv's venv at Homebrew's libexec directory.
    • Substituted pip install commands with uv sync --frozen --no-dev --python python3.13 for installing project dependencies.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

📦 Version Preview

  • Current version: v1.2.4
  • Bump type: pre-patch
  • Release version: v1.2.5
  • TestPyPI version: v1.2.5-rc.0

When this PR is merged, version will be bumped to v1.2.5.

To change the bump type, include in commit message: #major, #minor, or #patch

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The transition to uv for managing the Homebrew formula's installation is a positive change that improves build performance and ensures dependency reproducibility via the lockfile. I have identified a few necessary adjustments to the uv sync command to ensure it behaves correctly within the Homebrew build environment, specifically regarding the prevention of editable installs and the management of the uv cache directory.

system libexec/"bin/pip", "install", buildpath.to_s

# Install project + locked dependencies from uv.lock (no resolver runs)
system "uv", "sync", "--frozen", "--no-dev", "--python", "python3.13"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

By default, uv sync installs the project in editable mode. In the context of a Homebrew formula, the build directory is temporary and is deleted after the installation completes. An editable install would result in a broken package because the symlinks in the virtual environment would point to the non-existent build directory. Adding --no-editable ensures a standard, standalone installation.

    system "uv", "sync", "--frozen", "--no-dev", "--no-editable", "--python", "python3.13"

# Install the package and all dependencies
system libexec/"bin/pip", "install", "--upgrade", "pip", "setuptools", "wheel"
# Point uv's venv at Homebrew's libexec directory
ENV["UV_PROJECT_ENVIRONMENT"] = libexec.to_s
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

It is recommended to set UV_CACHE_DIR to a directory within the build sandbox (e.g., buildpath/".uv_cache"). This prevents uv from attempting to write to the default user cache directory, which may be restricted or cause permission issues in sandboxed or CI build environments.

    ENV["UV_PROJECT_ENVIRONMENT"] = libexec.to_s
    ENV["UV_CACHE_DIR"] = (buildpath/".uv_cache").to_s

@alkalescent alkalescent changed the title Fix/brew uv 📦 fix(ci): uv 📦 Feb 21, 2026
@alkalescent alkalescent merged commit 1591266 into master Feb 21, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant