jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.67k stars 608 forks source link

Multi-architecture hash support #2050

Closed laurentsimon closed 7 months ago

laurentsimon commented 7 months ago

What's the problem this feature will solve?

I have a project with ~1000 lines of pure python. I would like to generate a requirements.txt with hashes (--generate-hashes) that is platform-agnostic, ie I don't want to have to maintain multiple requirements.txt for each OS / architecture.

Some of my dependencies have architecture-specific wheels (i86, x64, osx, Windows, etc), and pip-compile produces hashes for platform-specific wheels. So I need to maintain a combination of requirements.txt, which is really hard.

Describe the solution you'd like

I would like the pip-compile command to generate a hash that refers to some sort of "bundle / manifest of hashes". This way the requirements.txt becomes platform-agnostic. I understand that pip won't understand this "bundle / manifest", so I probably need to ask on the pip repo as well?

Note: In docker containers, there is a similar option. As a user you can refer to a multi-arch image by hash, and docker will automatically pick the right image within the bundle to install on your machine

Alternative Solutions

Additional context

laurentsimon commented 7 months ago

@di

webknjaz commented 7 months ago

Duplicate of #826

webknjaz commented 7 months ago

Also, this isn't realistic at the moment: https://github.com/jazzband/pip-tools/issues/1326#issuecomment-1834517252.