mesonbuild / mesonbuild/meson-python

Support cross compiling

Open
#321 65 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
180
Forks
93
Avg merge
2d 7h
Merged PRs (30d)
18

Description

Even though meson supports cross compiling, it seems meson-python does not.

https://github.com/mesonbuild/meson-python/blob/78861f5ee4e5257cdebe3ab9faf84027466f1c0b/mesonpy/__init__.py#L313-L348 assumes that the extension is run on the same interpreter.
We use crossenv to cross compile in conda-forge and crossenv monkey-patches some things but monkey-patching `importlib.machinery.EXTENSION_SUFFIXES` does not seem like a good idea.

cc @h-vetinari, @rgommers, @eli-schwartz

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading mesonpy/__init__.py at the linked lines, especially its assumptions about the running interpreter and importlib.machinery. Review the crossenv context described in the issue and the 65-comment discussion for the intended approach. Done means meson-python can support Meson cross-compilation without relying on the reported monkey-patch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.