← Back to issue list

Python plugins install wheels for the host architecture, not the target architecture.

View original Github issue

Metadata

Project
craft-parts
Number
#974
Type
issue
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Python plugins (python, poetry, uv) create venvs and pip-install wheels for the host architecture, so cross-compiling a snap with binary Python packages (e.g. cryptography) silently produces a broken snap. Open, unlabelled, no comments, inactive ~16 months; bug still present in current code.

Suggested action: needs triage

Reason: Filed by a maintainer (lengau) but has no labels, no comments, and no assignee, so it was never triaged. I verified the bug is still live: python_plugin.py's _get_package_install_commands() runs plain `pip install` with no --platform/--target-arch handling, and BasePythonPlugin._get_create_venv_commands() in base.py still creates the venv from the host python3. The fix is non-trivial (cross-arch wheel fetching for all BasePythonPlugin subclasses), so it needs maintainer scoping rather than closure.

Impact: 55 Quick Win: 16.5 Staleness: 75 Complexity: 70 Confidence: 70 Support Request: 5

Issue body

### Bug Description All of the Python plugins create their virtual environments for the host architecture. While this isn't a problem if all packages are python-native, including a package with binary components will fail when doing a cross-compile. ### To Reproduce Try cross-compiling a snap with the parts specified below. It will succeed, but the snap won't have the correct cryptography package. ### part yaml ```shell parts: my-part: plugin: python source: . python-packages: - cryptography ``` ### Relevant log output ```shell n/a ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 55
Quick Win: 16.5
Staleness: 75
Complexity: 70
Confidence: 70
Support Request: 5
needs triage Python plugins (python, poetry, uv) create venvs and pip-install wheels for the host architecture, so cross-compiling a snap with binary Python packages (e.g. cryptography) silently produces a broken snap. Open, unlabelled, no comments, inactive ~16 months; bug still present in current code.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 65
Confidence: 75
Support Request: 5
needs triage Python plugin installs host architecture wheels instead of target, breaking cross-compilation. Unlabelled, no maintainer comments, inactive for ~16 months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 60
Confidence: 70
Support Request: 5
needs triage Python plugins create virtual environments for the host architecture, breaking cross-compilation with binary packages. The issue is unlabelled, has zero comments, and has been inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 70
Confidence: 75
Support Request: 5
needs triage Python plugins install host architecture wheels instead of target wheels, breaking cross-compilation for packages with binary dependencies. Status: open, unassigned, and untriaged. Requires a fix to properly support cross-architecture builds.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.