Hi, I have some question. Is it possible to have t...
# general
e
Hi, I have some question. Is it possible to have two
requirements.txt
files in separated folders for separated packages and with the same dependency (3rd part)? Because when I want to add the same dependency in second
requirements.txt
I lose the first one. I saw in docs
Dependency inference will no-op if >2 targets refer to the same file
section.
h
Hello! It is possible, only you will need to tell Pants which dependency you want to use explicitly in your BUILD file like this:
Copy code
python_library(
  dependencies=["path/to/req_file1:my_library"]
)
Also, pex/pip will complain if you have two of the same requirement used at the same time but with different versions, e.g.
pip install ansicolors==1.1.8 ansicolors==1.1.7
will fail: https://www.pantsbuild.org/docs/troubleshooting#double-requirement-given-error-when-resolving-requirements
e
Thank I will try.
h
Hey Łukasz, any luck with this?