Skip to content

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Dec 20, 2025

User description

PR Type

Enhancement, Bug fix


Description

  • Fix toolchain installation without git metadata by setting environment variables

  • Add build dependencies (setuptools-scm, hatch-vcs, hatchling, editables)

  • Update Cantera dependency to >=3.1.0 with binary-only installation

  • Refactor GitHub Actions workflow to handle tag creation events properly

  • Scope pretend-version environment variables and implement proper cleanup


Diagram Walkthrough

flowchart LR
  A["Homebrew Formula"] -->|"Add build deps"| B["setuptools-scm, hatch-vcs"]
  A -->|"Set env vars"| C["SETUPTOOLS_SCM_PRETEND_VERSION"]
  C -->|"Enable"| D["Editable install without git"]
  A -->|"Update"| E["Cantera >=3.1.0"]
  F["GitHub Actions"] -->|"Handle tag creation"| G["Deploy to tap"]
  F -->|"Audit PRs"| H["Formula validation"]
Loading

File Walkthrough

Relevant files
Bug fix
mfc.rb
Fix VCS-based toolchain builds without git metadata           

packaging/homebrew/mfc.rb

  • Updated MFC version from v5.1.0 to v5.1.5 with new SHA256 hash
  • Added build dependencies: setuptools-scm, hatch-vcs, hatchling,
    editables
  • Updated Cantera to >=3.1.0 with --only-binary=:all: flag
  • Implemented environment variable scoping for
    SETUPTOOLS_SCM_PRETEND_VERSION to handle VCS-less builds
  • Added --no-build-isolation flag for pip install to allow build backend
    access to environment variables
  • Set pretend-version variables during MFC build phase for mfc.sh script
+41/-5   
Configuration changes
deploy-tap.yml
Refactor workflow to use tag creation events                         

.github/workflows/deploy-tap.yml

  • Changed trigger from tag push to tag creation event (create event
    type)
  • Removed separate tag trigger configuration and consolidated into
    create event
  • Added conditional check to only run on tag creation, not branch
    creation
  • Improved event metadata detection to handle both create and push
    events
  • Updated formula update condition to trigger on both create and tag
    push events
  • Enhanced shell script with set -euo pipefail for better error handling
  • Fixed regex pattern for URL extraction to be more robust
+21/-11 


CodeAnt-AI Description

homebrew: install toolchain when tarballs lack git metadata and update formula + deploy workflow

What Changed

  • Formula updated to MFC v5.1.5 with corresponding source checksum so Homebrew installs the new release
  • Python venv now installs additional build backends so package builds succeed (setuptools-scm, hatchling/hatch-vcs, editables)
  • Toolchain installation from release tarballs now sets pretend-version environment variables so versioned installs work even without .git metadata; the toolchain is installed without build isolation so the pretend-version is respected
  • Cantera is installed from pre-built wheels matching ">=3.1.0" to avoid source CMake build failures
  • GitHub Actions workflow: deploy runs only for master when formula files changed and also handles tag creation events correctly (computes tarball URL and checksum for tag-created and tag-pushed events) and updates the formula only for tag events

Impact

✅ Homebrew installs succeed for release tarballs without .git metadata
✅ Avoids local Cantera source builds that previously failed on CI/machines
✅ Formula deploys trigger correctly on tag creation and on master updates

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Chores
    • Updated Homebrew formula package to v5.1.5 with improved version handling.
    • Enhanced deployment workflow with refined event detection and tag-based trigger support.
    • Strengthened build process environment variable propagation for consistent versioning.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 20, 2025 15:34
@codeant-ai
Copy link

codeant-ai bot commented Dec 20, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

The deployment workflow now distinguishes between tag creation and tag push events with separate triggers, modifying event metadata extraction and adding conditional guards. The Homebrew formula is bumped to v5.1.5, expands Python build dependencies, and refines version handling through setuptools_scm environment variables with improved build isolation.

Changes

Cohort / File(s) Change Summary
Deployment Workflow
.github/workflows/deploy-tap.yml
Modified push trigger to restrict to master branch only; introduced dedicated create (tag creation) trigger alongside tag (tag push) trigger. Added deployment guard to skip unless event is tag-related. Refactored event metadata extraction to derive version from tag names, use EVENT_NAME and REF_NAME variables, and conditionally extract tarball URLs. Updated formula update condition to run on both tag creation and tag push events.
Homebrew Formula
packaging/homebrew/mfc.rb
Bumped source tarball from v5.1.0 to v5.1.5 with updated SHA256. Extended Python venv bootstrap to install hatchling, hatch-vcs, and editables alongside existing tools. Enhanced version handling with tiered environment variables (SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MFC, SETUPTOOLS_SCM_PRETEND_VERSION_FOR_mfc, and fallback). Added --no-build-isolation flag to toolchain installation and propagated version environment variables into the build wrapper.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • Deployment workflow logic: Event metadata extraction and conditional routing require careful verification of tag-based version derivation and URL construction logic.
  • Environment variable propagation: Verify that tiered environment variable fallback in mfc.rb correctly handles all build scenarios and that --no-build-isolation does not inadvertently expose or mask environment issues.
  • Dependency additions: Confirm that new Python packages (hatchling, hatch-vcs, editables) are compatible and necessary for the build pipeline.

Possibly related PRs

Poem

🐰 A workflow so nimble, tag events now gleam,
Homebrew formula refined—v5.1.5 supreme!
Environment variables dance in perfect sync,
Build isolation holds steady, no missing link.
One tarball, one version, deployment's delight! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main fix: enabling toolchain installation without git metadata in Homebrew releases.
Description check ✅ Passed The description is comprehensive with clear sections covering changes, impacts, and diagrams, but is missing required checklist items from the repository template.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai bot added the size:M This PR changes 30-99 lines, ignoring generated files label Dec 20, 2025
@qodo-code-review
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Env Leakage

Pretend-version environment variables are carefully scoped/cleaned up around the pip install for toolchain, but they are then set again globally for the later mfc.sh build invocation without any cleanup. Verify this is intentional and won’t affect other build steps or post-install behavior; consider using a scoped env helper (or an ensure cleanup) for the mfc.sh call as well.

pretend_env = {
  "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MFC" => version.to_s,
  "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_mfc" => version.to_s,
  "SETUPTOOLS_SCM_PRETEND_VERSION"         => version.to_s, # Fallback for hatch-vcs/setuptools-scm
}
saved_env = {}
pretend_env.each do |k, v|
  saved_env[k] = ENV.fetch(k, nil)
  ENV[k] = v
end

begin
  system venv/"bin/pip", "install", "--no-build-isolation", "-e", buildpath/"toolchain"
ensure
  pretend_env.each_key do |k|
    if saved_env[k].nil?
      ENV.delete(k)
    else
      ENV[k] = saved_env[k]
    end
  end
end

# Create symlink so mfc.sh uses our pre-installed venv
mkdir_p "build"
ln_sf venv, "build/venv"

# Now build MFC with pre-configured venv
# Set VIRTUAL_ENV so mfc.sh uses existing venv instead of creating new one
ENV["VIRTUAL_ENV"] = venv

# Also set pretend-version env vars for mfc.sh in case it tries to reinstall toolchain
ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MFC"] = version.to_s
ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_mfc"] = version.to_s
ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.to_s

# Build MFC using pre-configured venv
# Must run from buildpath (MFC root directory) where toolchain/ exists
Dir.chdir(buildpath) do
  system "./mfc.sh", "build", "-t", "pre_process", "simulation", "post_process", "-j", ENV.make_jobs.to_s
Duplicate Logic

The formula sets three pretend-version variables (...FOR_MFC, ...FOR_mfc, and the generic SETUPTOOLS_SCM_PRETEND_VERSION) in two places (toolchain install and mfc.sh build). Validate which variable names are actually consumed by hatch-vcs/setuptools-scm and whether all variants are needed; if not, this can be simplified to reduce maintenance and accidental divergence.

pretend_env = {
  "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MFC" => version.to_s,
  "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_mfc" => version.to_s,
  "SETUPTOOLS_SCM_PRETEND_VERSION"         => version.to_s, # Fallback for hatch-vcs/setuptools-scm
}
saved_env = {}
pretend_env.each do |k, v|
  saved_env[k] = ENV.fetch(k, nil)
  ENV[k] = v
end

begin
  system venv/"bin/pip", "install", "--no-build-isolation", "-e", buildpath/"toolchain"
ensure
  pretend_env.each_key do |k|
    if saved_env[k].nil?
      ENV.delete(k)
    else
      ENV[k] = saved_env[k]
    end
  end
end

# Create symlink so mfc.sh uses our pre-installed venv
mkdir_p "build"
ln_sf venv, "build/venv"

# Now build MFC with pre-configured venv
# Set VIRTUAL_ENV so mfc.sh uses existing venv instead of creating new one
ENV["VIRTUAL_ENV"] = venv

# Also set pretend-version env vars for mfc.sh in case it tries to reinstall toolchain
ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MFC"] = version.to_s
ENV["SETUPTOOLS_SCM_PRETEND_VERSION_FOR_mfc"] = version.to_s
ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.to_s
Possible Issue

The workflow now triggers on create events and uses conditional logic to handle tag vs branch creation. Double-check that the job-level if and the metadata detection correctly cover all intended cases (tag create, tag push, push to master, PRs) and that github.ref_type/GITHUB_REF_TYPE are available as expected for each event type, otherwise the workflow may skip deployments or miscompute the version/URL.

if: github.event_name != 'create' || github.event.ref_type == 'tag'
permissions:
  contents: write
  pull-requests: write
steps:
  - name: Checkout MFC repository
    uses: actions/checkout@v4
    with:
      fetch-depth: 0

  - name: Determine event metadata
    id: meta
    run: |
      set -euo pipefail
      EVENT_NAME="${{ github.event_name }}"
      REF_NAME="${{ github.ref_name }}"

      if [[ "${EVENT_NAME}" == "create" ]]; then
        # Tag creation event
        VERSION="${REF_NAME#v}"
        URL="https://github.com/${{ github.repository }}/archive/refs/tags/v${VERSION}.tar.gz"
      elif [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then
        # Tag push event
        VERSION="${REF_NAME#v}"
        URL="https://github.com/${{ github.repository }}/archive/refs/tags/v${VERSION}.tar.gz"
      else
        # Extract URL from current formula to re-audit and sync
        URL="$(grep -Eo 'https://github.com/[^"]+/archive/refs/tags/v[0-9]+\.[0-9]+\.[0-9]+\.tar\.gz' packaging/homebrew/mfc.rb | tail -n 1)"
        VERSION="$(echo "${URL}" | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz/\1/')"
      fi

      SHASUM="$(curl -sL "${URL}" | shasum -a 256 | awk '{print $1}')"
      echo "version=${VERSION}" >> $GITHUB_OUTPUT
      echo "url=${URL}" >> $GITHUB_OUTPUT
      echo "sha256=${SHASUM}" >> $GITHUB_OUTPUT
      echo "Event: ${EVENT_NAME}" >> $GITHUB_STEP_SUMMARY
      echo "Version: ${VERSION}" >> $GITHUB_STEP_SUMMARY
      if [[ "${EVENT_NAME}" == "pull_request" ]]; then
        echo "Mode: Audit only (PR)" >> $GITHUB_STEP_SUMMARY
      else
        echo "Mode: Audit and deploy" >> $GITHUB_STEP_SUMMARY
      fi

  - name: Update formula (for tag events)
    if: github.event_name == 'create' || github.ref_type == 'tag'
    run: |

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@codeant-ai
Copy link

codeant-ai bot commented Dec 20, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Cantera installation risk
    The pip invocation uses "--only-binary=:all:" together with a loose constraint ("cantera>=3.1.0"). If a binary wheel for a newer 3.x release isn't available for the target platform, pip will fail instead of falling back to a source build. Consider pinning to a known binary-supported version or adding a more robust fallback strategy.

  • VIRTUAL_ENV assignment
    ENV["VIRTUAL_ENV"] is set to venv (a Pathname). Environment variables should be strings; assigning a non-string may rely on implicit conversion and could behave inconsistently. Use an explicit string (e.g., venv.to_s) to avoid subtle bugs on different Ruby versions or Homebrew runtime environments.

VERSION="$(echo "${URL}" | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz/\1/')"
fi
SHASUM="$(curl -sL "${URL}" | shasum -a 256 | awk '{print $1}')"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Add the -f flag to the curl command to ensure the workflow fails on HTTP errors like 404, preventing the generation of an incorrect checksum. [possible issue, importance: 8]

Suggested change
SHASUM="$(curl -sL "${URL}" | shasum -a 256 | awk '{print $1}')"
SHASUM="$(curl -sfL "${URL}" | shasum -a 256 | awk '{print $1}')"

# GitHub release tarballs without a .git directory. Use --no-build-isolation so the build
# backend can see our environment variables, and set SETUPTOOLS_SCM_PRETEND_VERSION which
# hatch-vcs respects when VCS metadata is unavailable.
pretend_env = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Replace the manual environment variable save/restore logic with Homebrew's with_env helper for cleaner and safer temporary environment scoping. [general, importance: 7]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes Homebrew formula installation failures that occur when building MFC's Python toolchain from release tarballs without git metadata. The toolchain uses VCS-based versioning (hatch-vcs), which requires git history or explicit version configuration.

  • Adds setuptools-scm and hatch-vcs dependencies with environment variable overrides to support building without git metadata
  • Updates Cantera version constraint to match toolchain/pyproject.toml requirements
  • Enhances GitHub Actions workflow to properly handle tag creation events

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packaging/homebrew/mfc.rb Updates formula to v5.1.5, adds VCS build dependencies, implements SETUPTOOLS_SCM_PRETEND_VERSION environment variable handling with save/restore pattern, and uses --no-build-isolation flag for pip install
.github/workflows/deploy-tap.yml Adds 'create' event trigger for tag deployments, updates conditional logic to handle both create and push tag events, improves grep pattern for URL extraction, and removes 'homebrew-new' branch from deployment targets


# Now build MFC with pre-configured venv
# Set VIRTUAL_ENV so mfc.sh uses existing venv instead of creating new one
ENV["VIRTUAL_ENV"] = venv
Copy link

Choose a reason for hiding this comment

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

Suggestion: Assigning a Pathname object to an environment variable (ENV["VIRTUAL_ENV"] = venv) can produce a non-string value in ENV; convert the Pathname to a string to ensure the environment variable contains a proper path string. [type error]

Severity Level: Minor ⚠️

Suggested change
ENV["VIRTUAL_ENV"] = venv
ENV["VIRTUAL_ENV"] = venv.to_s
Why it matters? ⭐

venv is a Pathname (libexec/"venv"). Setting ENV with an explicit string (venv.to_s) is clearer and avoids any ambiguity about value types stored in ENV. In practice Pathname#to_s will be called in many contexts, but making it explicit is a small, harmless improvement that prevents subtle surprises on environments or Ruby versions that expect true String values.

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** packaging/homebrew/mfc.rb
**Line:** 81:81
**Comment:**
	*Type Error: Assigning a Pathname object to an environment variable (`ENV["VIRTUAL_ENV"] = venv`) can produce a non-string value in ENV; convert the Pathname to a string to ensure the environment variable contains a proper path string.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

@codeant-ai
Copy link

codeant-ai bot commented Dec 20, 2025

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
.github/workflows/deploy-tap.yml (1)

58-58: Add -f flag to curl to fail on HTTP errors.

If the tarball URL returns a 404 or other HTTP error, the current command silently computes a checksum of the error page. Adding -f ensures the workflow fails fast with a clear error.

🔎 Proposed fix
-          SHASUM="$(curl -sL "${URL}" | shasum -a 256 | awk '{print $1}')"
+          SHASUM="$(curl -sfL "${URL}" | shasum -a 256 | awk '{print $1}')"
packaging/homebrew/mfc.rb (1)

81-81: Convert Pathname to string for ENV assignment.

venv is a Pathname object (libexec/"venv"). While Ruby will implicitly convert it in most contexts, explicitly calling .to_s avoids any ambiguity and potential issues with environment variable handling.

🔎 Proposed fix
-    ENV["VIRTUAL_ENV"] = venv
+    ENV["VIRTUAL_ENV"] = venv.to_s
🧹 Nitpick comments (1)
.github/workflows/deploy-tap.yml (1)

44-51: Duplicated URL construction and inconsistent environment variable reference.

  1. The URL construction logic is identical in both branches (lines 47 and 51) — consider consolidating.
  2. Line 48 uses ${GITHUB_REF_TYPE:-} (shell environment variable) while line 44 checks EVENT_NAME (derived from GitHub context). For consistency and reliability, prefer using the GitHub context ${{ github.ref_type }} directly.
🔎 Proposed consolidation
-          if [[ "${EVENT_NAME}" == "create" ]]; then
-            # Tag creation event
-            VERSION="${REF_NAME#v}"
-            URL="https://github.com/${{ github.repository }}/archive/refs/tags/v${VERSION}.tar.gz"
-          elif [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then
-            # Tag push event
-            VERSION="${REF_NAME#v}"
+          if [[ "${EVENT_NAME}" == "create" ]] || [[ "${{ github.ref_type }}" == "tag" ]]; then
+            # Tag creation or tag push event
+            VERSION="${REF_NAME#v}"
             URL="https://github.com/${{ github.repository }}/archive/refs/tags/v${VERSION}.tar.gz"
           else
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49d4ae9 and d576110.

📒 Files selected for processing (2)
  • .github/workflows/deploy-tap.yml (3 hunks)
  • packaging/homebrew/mfc.rb (5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • packaging/homebrew/mfc.rb
🧬 Code graph analysis (1)
packaging/homebrew/mfc.rb (1)
toolchain/mfc/common.py (1)
  • system (34-41)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Full Installation Test
  • GitHub Check: Build & Publish
🔇 Additional comments (8)
.github/workflows/deploy-tap.yml (3)

16-18: Appropriate guard for create event.

The create event triggers on both tag and branch creation. The job-level condition on line 27 correctly filters to only run for tag creation events. This is a clean approach.


27-27: Good defensive check for tag-only execution.

The condition github.event_name != 'create' || github.event.ref_type == 'tag' correctly ensures the job runs for all non-create events OR only for tag creation (not branch creation). This prevents unintended runs when branches are created.


71-71: Condition aligns with new triggers.

The formula update now correctly triggers on both create (tag creation) and github.ref_type == 'tag' (tag push), matching the dual-trigger design.

packaging/homebrew/mfc.rb (5)

32-36: Required build dependencies for VCS-less installs.

Adding setuptools-scm, hatchling, hatch-vcs, and editables enables building the toolchain from release tarballs that lack .git metadata. This aligns with the --no-build-isolation approach below.


49-73: Manual environment save/restore is verbose but functional.

The pattern correctly saves, sets, and restores the SETUPTOOLS_SCM_PRETEND_VERSION* variables. While Homebrew's with_env helper could simplify this, the current approach works and handles the ensure cleanup properly.

Note: Setting three variants (_FOR_MFC, _FOR_mfc, and the fallback) covers setuptools-scm's package name normalization behavior.


64-64: --no-build-isolation is necessary here.

Without this flag, pip creates an isolated build environment where the SETUPTOOLS_SCM_PRETEND_VERSION* variables would not be visible to the build backend. This is the correct fix for VCS-less builds.


83-87: Good defensive setup for potential toolchain reinstalls.

Setting the pretend-version variables again before running mfc.sh ensures consistent versioning if the build script attempts to reinstall or verify the toolchain.


9-10: Version bump and SHA256 hash are correct.

The tarball URL and SHA256 for v5.1.5 have been verified against the actual GitHub release archive. The hash matches the downloaded artifact.

@sbryngelson sbryngelson merged commit 32bd630 into MFlowCode:master Dec 20, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review effort 3/5 size:M This PR changes 30-99 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

1 participant