Skip to content

Adds out-of-the-box support for building wheels on musllinux / Alpine environments. - #82

Closed
Ichunjo wants to merge 1 commit into
python-project-templates:mainfrom
Varde-s-Forks:musllinux-support2
Closed

Ichunjo wants to merge 1 commit into
python-project-templates:mainfrom
Varde-s-Forks:musllinux-support2

Conversation

@Ichunjo

@Ichunjo Ichunjo commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Description

musllinux/Alpine builds incorrectly selected GNU targets, and Rust’s default static CRT prevented cdylib/Python extension builds.
This PR adds support for musl auto-detection, select the correct *-linux-musl target, and disable static CRT for cdylib builds while keeping executables static.

Type of Change

  • Bug fix
  • New feature

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality

- Auto-detect musl Linux environments via AUDITWHEEL_PLAT and packaging.tags.platform_tags()
- Support platform prefixes matching "musl*" in platform normalization and target mapping
- Auto-resolve host musl targets (e.g. x86_64-unknown-linux-musl) when building in musl environments
- Automatically pass -C target-feature=-crt-static to rustc_args for cdylib/extension artifacts on musl
- Preserve static CRT linking for musl executable (bin) targets and honor custom user target-features
- Add unit tests for musllinux target resolution and cdylib/bin flag generation
@timkpaine timkpaine mentioned this pull request Sep 29, 2026
5 of 11 tasks
@timkpaine

Copy link
Copy Markdown
Member

Superseded by #84, which preserves the original commit and adds the reviewed corrections on a repository-owned branch. Closing this fork-based PR.

@timkpaine timkpaine closed this Sep 29, 2026
@Ichunjo

Ichunjo commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Thank you!

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