-
-
Notifications
You must be signed in to change notification settings - Fork 628
Closed
Description
pip-compile
does not respect platform_system
correctly when it is specified multiple times for the same package. This is useful in cases where you need to have different versions of the same package on different OSs.
Environment Versions
- Mac M1
- Python version: 3.9.12
- pip version: 22.3.1
- pip-tools version: 6.12.1
Steps to replicate
Run pip-compile
on the following requirements.in
file:
grpcio-tools~=1.48.0 ; platform_system=="Darwin"
grpcio-tools>=1.48.0 ; platform_system!="Darwin"
Expected result
grpcio-tools
should occur twice in the requirements.txt
in a similar way to how it was specified
Actual result
Instead you get something like this where the dependency we specified only occurs once with the first platform_system.
grpcio==1.51.1
# via grpcio-tools
grpcio-tools==1.48.2 ; platform_system == "Darwin"
# via -r requirements/test.in
protobuf==3.20.3
# via grpcio-tools
Metadata
Metadata
Assignees
Labels
No labels