https://pantsbuild.org/ logo
#general
Title
# general
h

happy-kitchen-89482

10/18/2022, 12:35 AM
What else do you have in that BUILD file?
p

plain-carpet-73994

10/18/2022, 12:43 AM
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

happy-kitchen-89482

10/18/2022, 12:45 AM
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

plain-carpet-73994

10/18/2022, 12:45 AM
agreed.
Thanks
h

happy-kitchen-89482

10/18/2022, 12:46 AM
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
3 Views