acceptable-guitar-79854
02/17/2021, 1:37 PM-r constraints.txt
). pants.toml points to linux-constraints.txt but it complains that constraints.txt does not exist. I tried to add constraints.txt as resources but the issue persists. I had a look here https://www.pantsbuild.org/docs/python-third-party-dependencies but i did not find any options for python_requirements
that would help. I know pants is Linux only, but imho there are justified use cases for inheritance in requirements files like the one above (better than duplicating the constraints).hundreds-father-404
02/17/2021, 2:47 PMacceptable-guitar-79854
02/17/2021, 2:57 PMhundreds-father-404
02/17/2021, 3:08 PMacceptable-guitar-79854
02/17/2021, 3:32 PMpytest==...
pandas==...
⢠windows-constraints.txt
-r constraints.txt
pywin==...
⢠linux-constraints.txt
-r constraints.txt
few linux only deps==...
acceptable-guitar-79854
02/17/2021, 3:32 PMhundreds-father-404
02/17/2021, 3:58 PMconstraints.txt
as a requirements file, rather than a constraints file. Instead, Pants is doing the equivalent of pip install -c constraints.txt req1 req2
. I suspect the -r constraints.txt
would be ignored in that case with pip tooacceptable-guitar-79854
02/17/2021, 4:15 PMacceptable-guitar-79854
02/17/2021, 4:15 PMacceptable-guitar-79854
02/17/2021, 4:23 PMpip install -c linux-constraints.txt -r requirements.txt
enough-analyst-54434
02/17/2021, 5:39 PMenough-analyst-54434
02/17/2021, 5:39 PMenough-analyst-54434
02/17/2021, 5:39 PMhappy-kitchen-89482
02/17/2021, 6:51 PMhundreds-father-404
02/17/2021, 6:52 PMDoesn't pants support the union of multiple lockfiles?No, you can only specify a single constraints file with the
[python-setup]
option. I originally implemented it to work with multiple, but John very rightfully encouraged keeping it simple until we better understood the semantics of multiplehappy-kitchen-89482
02/17/2021, 6:53 PMhappy-kitchen-89482
02/17/2021, 6:53 PM