Skip to content

fix(docker): add cmake/make to build-deps for pycares wheel build#18

Merged
KingPin merged 1 commit into
mainfrom
fix/dockerfile-pycares-cmake
May 23, 2026
Merged

fix(docker): add cmake/make to build-deps for pycares wheel build#18
KingPin merged 1 commit into
mainfrom
fix/dockerfile-pycares-cmake

Conversation

@KingPin
Copy link
Copy Markdown
Owner

@KingPin KingPin commented May 23, 2026

Summary

  • pycares 5.0.0+ (now pulled in transitively via aiodns >= 4.0.3) uses CMake to build its bundled c-ares. Source build is forced on linux/arm/v7 since no musllinux_armv7l wheel is published, and the missing CMake caused build-and-push to fail with RuntimeError: CMake >= 3.5 is required to build pycares.
  • Adds cmake and make to the apk .build-deps virtual package — they're cleaned up in the same layer via apk del .build-deps, so the final image stays slim.

Why now

build-and-push is currently red on main and on all four open dependabot PRs:

This is the common root cause for all of them.

Test plan

  • lint-and-test job still green
  • build-and-push job green for all three platforms (linux/amd64, linux/arm64, linux/arm/v7)
  • After merge, rebase the four dependabot PRs (`@dependabot rebase`) and confirm their builds go green

pycares 5.0.0+ (pulled in by aiodns 4.0.3) now uses CMake to build its
bundled c-ares. Source build is forced on linux/arm/v7 because no
musllinux_armv7l wheel is published, so without cmake the apk build-deps
the multi-arch image build fails with:

  RuntimeError: CMake >= 3.5 is required to build pycares.

This unblocks the build-and-push job on main and on the four open
dependabot PRs (#14 python-dotenv, #15 tenacity, #16 pytest-asyncio,
#17 aiodns).
Copilot AI review requested due to automatic review settings May 23, 2026 03:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes multi-arch Docker image builds by ensuring Alpine has the build tooling required to compile pycares from source (notably on linux/arm/v7, where no compatible wheel is available), unblocking the build-and-push workflow.

Changes:

  • Add cmake and make to the Docker build-only dependencies (.build-deps) so pycares>=5 can build its bundled c-ares.
  • Keep the final image slim by removing .build-deps in the same layer after pip install.

@KingPin KingPin merged commit 934d8ef into main May 23, 2026
6 checks passed
@KingPin KingPin deleted the fix/dockerfile-pycares-cmake branch May 23, 2026 16:02
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