What else do you have in that BUILD file?
# general
h
What else do you have in that BUILD file?
p
Yeah, I have my requirements.txt and a very minimal BUILD with the python_requirements and some module mapping stuff and that's it. But, I think that has to be in the parent of both
src
and
typing
if I want those two roots to share dependencies. And I think I do want that. For example, I might have a stub for some pytorch methods that return numpy things and I'd want the versions of those numpy things to match what's being used in
src
, right?
h
Nope! You could put them under
3rdparty
or wherever, Pants doesn’t need them to be in a parent of the files that import them
But that wouldn’t solve the problem you were having
which is that for some reason Pants needs your
requirements.txt
to be under a source root…
There’s no harm in adding that source root, but it’s a bit silly to have to do that…
p
agreed.
Thanks
h
I’ve seen that before, will try and track it down at some point
👍 1
I think it’s because Pants sees
requirements.txt
as a dummy source, or something like that