fix(docker): add cmake/make to build-deps for pycares wheel build#18
Merged
Conversation
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).
Contributor
There was a problem hiding this comment.
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
cmakeandmaketo the Docker build-only dependencies (.build-deps) sopycares>=5can build its bundledc-ares. - Keep the final image slim by removing
.build-depsin the same layer afterpip install.
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.
Summary
pycares 5.0.0+(now pulled in transitively viaaiodns >= 4.0.3) uses CMake to build its bundledc-ares. Source build is forced onlinux/arm/v7since nomusllinux_armv7lwheel is published, and the missing CMake causedbuild-and-pushto fail withRuntimeError: CMake >= 3.5 is required to build pycares.cmakeandmaketo the apk.build-depsvirtual package — they're cleaned up in the same layer viaapk del .build-deps, so the final image stays slim.Why now
build-and-pushis currently red onmainand on all four open dependabot PRs:This is the common root cause for all of them.
Test plan
lint-and-testjob still greenbuild-and-pushjob green for all three platforms (linux/amd64, linux/arm64, linux/arm/v7)