Skip to content

Pin architecture-specific wheels for extractcode and libmagic - #2488

Open
Anurag-S1ngh wants to merge 1 commit into
aboutcode-org:mainfrom
Anurag-S1ngh:fix/2426-arm64-wheels
Open

Anurag-S1ngh wants to merge 1 commit into
aboutcode-org:mainfrom
Anurag-S1ngh:fix/2426-arm64-wheels

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown

Summary

docker compose build fails on Apple Silicon with ResolutionImpossible because the pinned extractcode-7z, extractcode-libarchive, and typecode-libmagic releases publish architecture-exclusive wheels. The .210531 releases are x86_64/Windows only, and the arm64/aarch64 builds live in .210525 for extractcode and .210223 for typecode-libmagic, so a single pin cannot cover both.

Changes

  • Replaced the three unconditional pins in requirements.txt and requirements-dev.txt with platform-conditional pins.
  • arm64 and aarch64 select extractcode-7z==16.5.210525, extractcode-libarchive==3.5.1.210525, and typecode-libmagic==5.39.210223.
  • Every other machine keeps the existing 16.5.210531, 3.5.1.210531, and 5.39.210531 pins.

Testing

  • docker compose build vulnerablecode completes on Apple Silicon (arm64) with this change. Before the change it failed at the pip step with ResolutionImpossible.
  • Marker evaluation checked for arm64, aarch64, x86_64, and AMD64; each selects the expected version.
  • pip download --only-binary=:all: on arm64 fetches the three arm64 wheels.
  • The Dockerfile pip step was also run as a dry run in python:3.12, resolving the same three arm64 versions.

Closes #2426

The 16.5.210531 and 3.5.1.210531 extractcode releases publish only x86_64 and Windows wheels, and 5.39.210531 does the same for typecode-libmagic. The 16.5.210525 and 3.5.1.210525 releases publish only arm64 and aarch64 wheels, so a single pin cannot work on both architectures and docker compose build fails on Apple Silicon. Select the arm64 pins with platform markers and keep the existing x86_64/Windows pins for every other machine.

Signed-off-by: Anurag Singh <anuragsingh2313@gmail.com>

This branch has not been deployed

No deployments
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.

Docker build fails on Apple Silicon (arm64) — only x86_64 wheels pinned for extractcode-7z, extractcode-libarchive, typecode-libmagic

1 participant