happy-psychiatrist-90774
09/30/2024, 2:09 PMresolve and interpreter_constraints of each of its users like so:
python_sources(
**parametrize('app_1', interpreter_constraints=['==3.7.*'], resolve='app_1'),
**parametrize('app_2', interpreter_constraints=['==3.8.*'], resolve='app_2'),
)
poetry_requirements(
resolve=parametrize('app_1', 'app_2')
)
I'm thinking of a programmatic way of injecting those parameters automatically like synthetic targets
Is there any way to possibly achieve that?fast-nail-55400
09/30/2024, 4:34 PM__defaults__ mechanism to set default field values for targets. https://www.pantsbuild.org/stable/docs/using-pants/key-concepts/targets-and-build-files#field-default-valuesfast-nail-55400
09/30/2024, 4:36 PMmy_python_sources) which also injects the parameters (but then all relevant BUILD files would need to be updated to use my_python_sources instead of python_sources ). https://www.pantsbuild.org/stable/docs/writing-plugins/macroshappy-psychiatrist-90774
10/01/2024, 7:39 AMresolve and interpreter_constraints
3. Update the package target with this information as previously explained
Correct me if I'm wrong but both __defaults__ & macros are hard-coded...