Skip to content

Fix/devcontainer qt deps #61611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Drei-E3
Copy link

@Drei-E3 Drei-E3 commented Jun 8, 2025

  • closes Metadata generation failed when installing PyQt5 #61037
  • [Tests not added and not passed]Test: Manually ran pytest inside the devcontainer to confirm PyQt5 and pytest-qt are functional.
  • Adding platform: linux/amd64 to the docker-compose.yml dev service to work around image compatibility issues on Apple Silicon.
  • Switching from direct Dockerfile builds to docker-compose.yml via updates in .devcontainer/devcontainer.json:
    Removed "dockerFile" setting
    Added "service", "workspaceFolder", and "dockerComposeFile"
  • Installing qt5-qmake and qtbase5-dev via apt-get to support pytest-qt, which is required for the test suite. However this is commented in order to avoid redundant tools installed on not arm/Arch64 plattform just like the original file. The user should uncomment it.

These changes resolve build failures seen on Apple Silicon when using the VS Code Remote - Containers extension.

Why this matters:

Apple Silicon machines often encounter architecture compatibility issues when building development containers, especially when Python packages need to compile C/C++ or Qt-based code. These changes ensure a smooth devcontainer build experience on both ARM64 and x86_64 environments.

Introduction

If you use mac Silicon, you should uncomment "# platform: linux/amd64" of docker-compose.yml file and #-y qt5-qmake qtbase5-dev\ of Dockerfile. If you use another plattform, just build dev container or docker container as usual, nothing was changed.

Zeming Leng added 2 commits June 8, 2025 19:43
…r-compose for M chip Mac compatibility

- Added docker-compose.yml to specify platform linux/amd64 as an option
- Adjusted devcontainer.json to use docker-compose setup
- This fixes build issues on Apple Silicon Macs when building the dev container
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.

Metadata generation failed when installing PyQt5
1 participant