adventurous-island-11048
07/22/2022, 9:04 PM./pants tailor
I noticed it recursed down into my python package to add a BUILD
file to every level of the Python package. Is this required to have all of those BUILD
files, or can you have one for each python package?witty-crayon-22786
07/22/2022, 9:06 PMBUILD
file per relevant directory, as it’s effectively inevitable that you’ll need metadata for some of your filesadventurous-island-11048
07/22/2022, 9:09 PMwitty-crayon-22786
07/22/2022, 9:10 PMwide-midnight-78598
07/22/2022, 9:11 PMwitty-crayon-22786
07/22/2022, 9:12 PMadventurous-island-11048
07/22/2022, 9:20 PMhigh-yak-85899
07/22/2022, 9:21 PMtestdata
directory for unit tests. If you place the BUILD
file for those resources in that directory, you then have to use absolute references in the directory you care about (often only one level up) which is burdensome.
Instead, I like referencing my testdata files where my test targets live so I can use simpler target syntax when setting dependencies.happy-kitchen-89482
07/22/2022, 9:36 PM**/*.py
) in their sources=
to capture all the subdirs.tailor
won't help you there though, but you could roll your own similar thing, or just do it manually since there would be a lot fewer to begin with.