Skip to content

Comments

Fix macOS build: add backend/models directory and constrain dependencies#3

Merged
lmangani merged 6 commits intomainfrom
copilot/fix-missing-files-and-dependencies
Jan 28, 2026
Merged

Fix macOS build: add backend/models directory and constrain dependencies#3
lmangani merged 6 commits intomainfrom
copilot/fix-missing-files-and-dependencies

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

macOS release workflow failed due to missing backend/models directory referenced in PyInstaller spec and unconstrained Python dependencies causing yanked package installation.

Changes

Directory structure

  • Add backend/models/.gitkeep - PyInstaller spec line 28 requires this directory at build time (models download to ~/Library/Application Support/HeartMuLa/ at runtime)

Dependencies (requirements_macos.txt)

  • Constrain transformers>=4.35.0,<4.57.0 - avoids yanked 4.57.0
  • Add triton>=2.0.0; platform_machine != "arm64" - torch.compile optimization, skip on Apple Silicon
  • Document optional dependencies (mamba-ssm, tensorboard)

Validation

  • Add validate_build_assets.sh - pre-flight checks for files, directories, dependency configuration
  • Update build/macos/README.md - validation usage and troubleshooting

Build artifacts

  • Update .gitignore - exclude test scripts and build artifacts

Context

PyInstaller spec includes these data paths that must exist at build:

datas += [('backend/models', 'backend/models')]
datas += [('backend/generated_audio', 'backend/generated_audio')]
datas += [('backend/ref_audio', 'backend/ref_audio')]

Only backend/models was missing from the repository.

Original prompt

Observed Issues:

During the "Build macOS Release" workflow, multiple errors were encountered:

  1. Missing Files:

    • build/macos/HeartMuLa.icns was not found after the generate_icon.sh script execution.
    • build/macos/codesign.sh was missing.
    • .github/DMG_README.txt was missing.
    • backend/models directory or one of its expected files was not found.
  2. Python Dependency Issues:

    • Modules triton, mamba_ssm, and tensorboard were not found during the PyInstaller process.
    • A yanked version of the transformers library (4.57.0) was used, leading to potential setup issues.

Fixes Implemented in This PR:

  1. Addressing Missing Files:

    • build/macos/generate_icon.sh: Verified and ensured the script exists and is executable. If missing, added it to the repository.
    • build/macos/codesign.sh: Added a placeholder script for code signing and ensured it's executable. For production, this should be updated with a valid signing script.
    • .github/DMG_README.txt: Added a preliminary DMG README file with instructions for the disk image.
    • backend/models: Verified the required files. If generated dynamically, updated the workflow to ensure proper generation and placement.
  2. Python Dependency Updates:

    • Updated requirements_macos.txt to add missing dependencies:
      triton
      mamba-ssm
      tensorboard
      
    • Reverted to a stable version of the transformers library:
      transformers>=4.35.0,<4.57.0
      
  3. General Workflow Improvements:

    • Added steps to validate the existence of dynamically generated files before execution.
    • Improved logging on any missing files to capture the output of related scripts and workflows.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 28, 2026 22:19
…issing dependencies

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
…y fixes

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing files and Python dependency issues in macOS build Fix macOS build: missing backend/models directory and dependency constraints Jan 28, 2026
Copilot AI requested a review from lmangani January 28, 2026 22:25
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title Fix macOS build: missing backend/models directory and dependency constraints Fix macOS build: add backend/models directory and constrain dependencies Jan 28, 2026
@lmangani lmangani marked this pull request as ready for review January 28, 2026 22:37
@lmangani lmangani merged commit 78680bd into main Jan 28, 2026
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.

2 participants