Skip to content

Fix installation on case-insensitive OSes by dynamically skipping legacy MaxText directory#3469

Merged
copybara-service[bot] merged 1 commit intomainfrom
igorts/fix_macos
Mar 26, 2026
Merged

Fix installation on case-insensitive OSes by dynamically skipping legacy MaxText directory#3469
copybara-service[bot] merged 1 commit intomainfrom
igorts/fix_macos

Conversation

@igorts-git
Copy link
Copy Markdown
Collaborator

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

Description

Workaround for case-insensitive OSes where "maxtext" and "MaxText" directory names conflict.

  • Enable custom build hook in pyproject.toml.
  • Update build_hooks.py to skip src/MaxText on case-insensitive OSes while maintaining legacy support on Linux.
  • Added a note that MaxText is only testing on Linux during releases.
  • Piggybacking on this PR, also added maxtext_venv/ to .gitignore. This is the name of the venv directory that our documentation instructs users to use.

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
Copy Markdown

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 thread docs/install_maxtext.md Outdated
@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
@igorts-git igorts-git force-pushed the igorts/fix_macos branch 2 times, most recently from ea6c785 to 31328b8 Compare March 24, 2026 16:16
Comment thread build_hooks.py Outdated
Comment thread build_hooks.py Outdated
Comment thread docs/install_maxtext.md Outdated
@igorts-git igorts-git force-pushed the igorts/fix_macos branch 2 times, most recently from 3e92570 to 63762c2 Compare March 25, 2026 00:07
@igorts-git igorts-git changed the title Fix macOS installation by dynamically skipping legacy MaxText directory Fix installation on case-insensitive OSes by dynamically skipping legacy MaxText directory Mar 25, 2026
Copy link
Copy Markdown
Collaborator

@bvandermoon bvandermoon left a comment

Choose a reason for hiding this comment

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

LGTM, there are some copybara changes needed for this also. I'll send them over offline

@copybara-service copybara-service Bot merged commit b5e833c into main Mar 26, 2026
63 of 65 checks passed
@copybara-service copybara-service Bot deleted the igorts/fix_macos branch March 26, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

3 participants