Skip to content

Resolve sys.prefix symlinks when replacing host include paths#375

Merged
agriyakhetarpal merged 1 commit into
pyodide:mainfrom
pthom:fix-pywasmcross-symlinked-prefix
Jun 12, 2026
Merged

Resolve sys.prefix symlinks when replacing host include paths#375
agriyakhetarpal merged 1 commit into
pyodide:mainfrom
pthom:fix-pywasmcross-symlinked-prefix

Conversation

@pthom

@pthom pthom commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #374.

replay_genargs_handle_dashI now resolves symlinks for both include_path and sys.prefix before comparison.

The added regression test (real symlink in tmp_path) fails on main and passes with this change.

@pthom pthom force-pushed the fix-pywasmcross-symlinked-prefix branch from 3e88e1a to bd2590f Compare June 12, 2026 17:45
replay_genargs_handle_dashI now resolves symlinks before comparisons.
This is required for homebrew Python (macOS), where sys.prefix contains symlinks.
@pthom pthom force-pushed the fix-pywasmcross-symlinked-prefix branch from bd2590f to 52c1923 Compare June 12, 2026 18:10

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, thanks @pthom! I was also having this problem with Homebrew Python on my machine, but I didn't spend enough time debugging!

Would you like me to cut a release with this change?

@pthom

pthom commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Hi @agriyakhetarpal

Would you like me to cut a release with this change?

If possible, yes. At the moment, I do have to patch pyodide-build manually.

@agriyakhetarpal agriyakhetarpal merged commit 9d70192 into pyodide:main Jun 12, 2026
9 checks passed
@agriyakhetarpal

Copy link
Copy Markdown
Member

Sorry for the trouble. Let me do so, then!

agriyakhetarpal added a commit that referenced this pull request Jun 12, 2026
@pthom

pthom commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Thank you very much for the quick release

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.

pyodide build uses host Python headers on macOS with homebrew Python

2 participants