adamant-magazine-16751
03/14/2023, 3:56 PMtailor? Or would I need to write a plugin for that?adamant-magazine-16751
03/14/2023, 3:57 PM_src to every python_sources target's nameadamant-magazine-16751
03/14/2023, 4:03 PMalias_mappinghappy-kitchen-89482
03/14/2023, 8:10 PMadamant-magazine-16751
03/14/2023, 8:39 PMdocker_image but the name is taken by python_sources . I rarely use the sources targets in any pants invocations. So I figured I'd like to use the format <dirname>_src for sources.adamant-magazine-16751
03/14/2023, 8:41 PMpython_sources if not set. Tailor generates python_sources() so there's no way to get the name from **kwargs.
So I think the only way to achieve this would be to write a plugin. Am I right?adamant-magazine-16751
03/14/2023, 8:44 PMadamant-magazine-16751
03/14/2023, 8:51 PMdef custom_python_sources(**kwargs):
kwargs["name"] = f"{kwargs['name']}_src"
python_sources(**kwargs)
this is what I came up with
and this is the error I get with custom_python_sources() in BUILD
21:49:53.58 [ERROR] 1 Exception encountered:
Engine traceback:
in `list` goal
in Find targets from input specs
in Search for addresses in BUILD files - src/b24/celery
MappingError: Failed to parse ./src/b24/celery/BUILD:
'name'