fresh-cat-90827
02/21/2022, 9:53 PMfresh-cat-90827
02/21/2022, 9:53 PMpackage==1.0.0 , the requirements.txt has been resolved to constraints.txt and is used with [python-setup].requirement_constraints . Now, we’d like to add another project that is happy with all the resolved constraints, except it needs package==0.9.9 .
To fix this for that particular project, I just have to declare an explicit dependency as per docs.
python_requirement_library(
name="package_0_9_9",
requirements=["package==0.9.9"]
)
python_source(...
dependencies=[":package_0_9_9"])
However, now I cannot use constraints any longer since there is package==1.0.0 in the constraints.txt (that is, pip will be confused — it won’t be able to install both package==1.0.0 and package==0.9.9 at the same time). I could automate stripping package out of the constraints when it’s generated (to avoid conflict for that project), but it feels hacky. Any better ideas?enough-analyst-54434
02/21/2022, 10:00 PMhundreds-father-404
02/21/2022, 10:37 PMhundreds-father-404
02/21/2022, 10:37 PMfresh-cat-90827
02/21/2022, 10:59 PM