numerous-pharmacist-91083
05/02/2024, 9:39 PMimportlib . Since the imports are dynamic Pants doesn't know about the dependencies so I need to specify them manually in the pex_binary or python_sources . However, I want to depend on all the libraries in all subdirectories of a given directory without having to manually list them all. I get errors if I use something like dependencies=['path/to/dir/::'] that say, "The address... from the dependencies field from the target <target> ended in a wildcard (::), which is not supported."
Is there a way to add a dependency on all subdirectories?happy-kitchen-89482
05/02/2024, 9:58 PMnumerous-pharmacist-91083
05/02/2024, 9:59 PMdef import_module(root: Path, module: str) -> ModuleType:
imported = importlib.import_module(f'deploys.{module}')
return importednumerous-pharmacist-91083
05/02/2024, 10:00 PMroot is currently ignored - long story)numerous-pharmacist-91083
05/02/2024, 10:00 PMdeploys to be dependencies.happy-kitchen-89482
05/02/2024, 10:03 PMhappy-kitchen-89482
05/02/2024, 10:03 PMhappy-kitchen-89482
05/02/2024, 10:03 PMhappy-kitchen-89482
05/02/2024, 10:04 PMnumerous-pharmacist-91083
05/02/2024, 10:04 PMhappy-kitchen-89482
05/02/2024, 10:04 PMsources= can be globsnumerous-pharmacist-91083
05/02/2024, 10:05 PMpants.toml, BUILD , etc.) so I have 2 pants projects and one depends on the other (from the local disk, not pypi or other repo)?numerous-pharmacist-91083
05/02/2024, 10:05 PMsources might work...happy-kitchen-89482
05/02/2024, 10:06 PMsources of some target doesn't mean Pants will make them depend on each otherhappy-kitchen-89482
05/02/2024, 10:07 PMhappy-kitchen-89482
05/02/2024, 10:07 PMnumerous-pharmacist-91083
05/02/2024, 10:07 PM***/**.py supported)? I don't see that in the docs.numerous-pharmacist-91083
05/02/2024, 10:07 PMhappy-kitchen-89482
05/02/2024, 10:09 PMhappy-kitchen-89482
05/02/2024, 10:09 PMdeploys target that globs over everything, and then a manual dep on it from the calling codehappy-kitchen-89482
05/02/2024, 10:10 PMhappy-kitchen-89482
05/02/2024, 10:10 PMnumerous-pharmacist-91083
05/02/2024, 10:10 PMcareful-address-89803
05/03/2024, 1:59 AMtarget and add the output of pants list my/dir:: as dependencies. Or something like that, it was a while agocurved-manchester-66006
05/13/2024, 7:37 PM