Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Last active March 17, 2026 23:22
Show Gist options
  • Select an option

  • Save bennuttall/96674e828f9f3a8d104c3fe4206b10fb to your computer and use it in GitHub Desktop.

Select an option

Save bennuttall/96674e828f9f3a8d104c3fe4206b10fb to your computer and use it in GitHub Desktop.
from pathlib import Path
import sys
from piwheels.slave.builder import Builder, Wheel
wheel_file_path = Path(sys.argv[1])
builder = Builder(None, None)
wheel = Wheel(wheel_file_path)
builder.calc_apt_dependencies(wheel)
with open(sys.argv[2], "w") as f:
for pkg in wheel.dependencies["apt"]:
f.write(pkg + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment