powerful-florist-1807
05/20/2021, 6:04 PMhundreds-father-404
05/20/2021, 6:08 PMbut it seems the only way to have conflicting versions of dependencies is to write "python_requirement_library()" for each of them.That wouldn't quite help. FYI, that
python_requirements() macro is doing nothing more than reading your requirements.txt and creating python_requirement_library() for each entry
Instead, what that warning is saying is that dependency inference won't work for those conflicting versions. You will need to explicitly add the requirement you want to the dependencies field wherever that requirement is used, e.g. add dependencies=["3rdparty/python:Django"] to the relevant python_library or python_tests targetpowerful-florist-1807
05/20/2021, 6:26 PMhundreds-father-404
05/20/2021, 6:28 PMrequests>=3 in project1/requirements.txt and then requests==2.8.0 in project2/requirements.txt. You could alternatively define those in BUILD files with python_requirement_library, but you can use requirements.txt instead
Then, whenever you have import requests, you need to decide if you should add project1:requests or project2:requests to the dependencies field
Does that make sense?powerful-florist-1807
05/20/2021, 6:29 PMpowerful-florist-1807
05/20/2021, 11:44 PM