Add QEMU multi-architecture support for PyInstaller builds#318
Merged
Add QEMU multi-architecture support for PyInstaller builds#318
Conversation
Co-authored-by: Ljzd-PRO <63289359+Ljzd-PRO@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] 给.github/workflows/python-package.yml增加使用qemu的action,在Linux的多种常见架构环境以及Windows的x86和amd64下使用pyinstaller构建
Add QEMU multi-architecture support for PyInstaller builds
Aug 17, 2025
Owner
|
Co-authored-by: Ljzd-PRO <63289359+Ljzd-PRO@users.noreply.github.com>
Contributor
Author
... Fixed the pipx installation error in the QEMU builds. The issue was that |
Owner
|
@copilot 去除armv7,Linux只需要arm64和amd64 |
Co-authored-by: Ljzd-PRO <63289359+Ljzd-PRO@users.noreply.github.com>
Contributor
Author
Ljzd-PRO
approved these changes
Aug 17, 2025
Owner
|
Co-authored-by: Ljzd-PRO <63289359+Ljzd-PRO@users.noreply.github.com>
Contributor
Author
... Fixed the PyInstaller objdump error by adding the |
Ljzd-PRO
approved these changes
Aug 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements QEMU-based cross-compilation support in the GitHub Actions workflow to enable PyInstaller builds across multiple architectures, addressing the need for broader platform support.
Changes Made
Enhanced Build Matrix
Extended the
create-executablejob matrix to support 6 different architecture combinations:QEMU Integration
Added QEMU emulation using
docker/setup-qemu-action@v3for Linux ARM builds:Dual Build Strategy
Implemented conditional build logic:
python:3.13-slim-bullseyefor ARM architecturesUpdated Python Setup Action
Enhanced
.github/actions/setup-python/action.ymlto accept anarchitectureparameter, enabling Windows x86 builds alongside the default x64.Improved Artifact Naming
Updated artifact names to include architecture information:
ktoolbox-executable-${{ runner.os }}-${{ matrix.arch }}Technical Details
The QEMU builds run inside Docker containers to ensure proper cross-compilation:
This approach maintains consistency with the existing build process while extending support to ARM architectures that cannot be natively built on GitHub's x64 runners. The
binutilspackage provides theobjdumputility required by PyInstaller for Linux builds. Poetry is installed directly via pip to avoid dependency issues with pipx in the Debian Bullseye repositories.Benefits
The implementation maintains backward compatibility while significantly expanding the project's reach across different hardware platforms.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.