-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k

Description
Is your feature request related to a problem? Please describe.
Currently it is not possible to create a Pipfile.lock for multiple platforms automatically.
Only hashes for the current platform are locked.
This is problematic when you want to use Pipefile.lock to share locked dependency versions in a multi platform setup, e.g. development on Windows or Mac and production on Linux.
E.g. cryptography generates the following Pipfile.lock entry on Windows 10 64bit:
"cryptography": {
"hashes": [
"sha256:471e0d70201c069f74c837983189949aa0d24bb2d751b57e26e3761f2f782b8d",
"sha256:f224ad253cc9cea7568f49077007d2263efa57396a2f2f78114066fd54b5c68e"
],
"markers": "python_version >= '3.6'",
"version": "==37.0.2"
},
and the following one on a Linux VM:
"cryptography": {
"hashes": [
"sha256:0cc20f655157d4cfc7bada909dc5cc228211b075ba8407c46467f63597c78178",
"sha256:2bd1096476aaac820426239ab534b636c77d71af66c547b9ddcd76eb9c79e004",
"sha256:59b281eab51e1b6b6afa525af2bd93c16d49358404f814fe2c2410058623928c",
"sha256:f224ad253cc9cea7568f49077007d2263efa57396a2f2f78114066fd54b5c68e"
],
"markers": "python_version >= '3.6'",
"version": "==37.0.2"
},
Describe the solution you'd like
My preferred solution would be a new entry in the Pipfile that defines which platforms hashes must always be included when locking.
If the current systems platform isn't in the list it should be be added to the lock list though to retain backwards compatibility.
The Pipfile entry could look like this:
[[source]]
platforms = "manylinux_2_24_x86_64 or win_amd_64"
If possible it would be great if the values could be eagerly validated and an error message printed on invalid values.
Note: Ticket #210 is similar to this one, but I was asked to open a new ticket