Skip to content

Fix macOS installation by dynamically skipping legacy MaxText directory#3469

Open
igorts-git wants to merge 1 commit intomainfrom
igorts/fix_macos
Open

Fix macOS installation by dynamically skipping legacy MaxText directory#3469
igorts-git wants to merge 1 commit intomainfrom
igorts/fix_macos

Conversation

@igorts-git
Copy link
Collaborator

@igorts-git igorts-git commented Mar 20, 2026

Description

  • Enable custom build hook in pyproject.toml.
  • Update build_hooks.py to skip src/MaxText on macOS while maintaining legacy support on Linux.
  • Add macOS-specific installation guide to docs/install_maxtext.md.
  • Add sys_platform == 'linux' statements from PR #3467

FIXES: #3441

Tests

Linux Wheel Parity Test.
To ensure that the generated package for Linux remains exactly the same as before, I ran the following commands on a Linux environment:

# 1. Build the wheel
pip wheel . --no-deps -w dist/
# 2. Verify the contents of the generated wheel
unzip -l dist/maxtext-0.2.1-py3-none-any.whl > /tmp/file_structure.txt

# Manually compared the files before and after this PR to ensure that they are identical.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment on lines +64 to +67
## macOS Installation

Due to macOS's case-insensitive filesystem, special care is needed to avoid conflicts between the `maxtext` and legacy `MaxText` package names. We recommend installing it from source using the `.[runner]` configuration.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you are handling ignoring the src/MaxText files in this PR, does this comment need to be user-facing? Maybe it could just say that only the runner option is supported on MacOS

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, I changed the wording here. PTAL.

@igorts-git igorts-git force-pushed the igorts/fix_macos branch 2 times, most recently from be0d4a7 to 8d5b43b Compare March 20, 2026 20:38
@igorts-git igorts-git requested a review from parambole as a code owner March 20, 2026 20:38
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.

MaxText seems broken, as importing it throws and error from MaxText itself.

2 participants