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

happy-kitchen-89482

05/10/2022, 11:57 PM
What would be a good way to parametrize a python_distribution target so that we can generate wheels for each of multiple interpreter_constraints, when python_distribution itself doesn't have an interpreter_constraints field (its deps do)?
1
w

witty-crayon-22786

05/10/2022, 11:59 PM
parametrize the deps?
…although you’d need to also adjust other fields, presumably.
so might need a macro/method for now =/
h

happy-kitchen-89482

05/11/2022, 12:00 AM
Could do but some of the deps are repeated, so that would be more boilerplate than we'd like
E.g., there is also a dep on a resources() , which is not parametrized
Maybe I can move those around though
Is there a way to pass through the parametrization? E.g., "use the parameter name I was instantiated with as the parameter of my dep"?
w

witty-crayon-22786

05/11/2022, 12:03 AM
that should happen by default, yea.
h

happy-kitchen-89482

05/11/2022, 12:06 AM
Ah, that works for the same parameter name ("resolve" in that example) but here
python_distribution
doesn't have an
interpreter_constraints
field to parametrize on
did we implement configurations from that doc?
w

witty-crayon-22786

05/11/2022, 12:22 AM
No, not yet. Can use a method/macro to do it though
5 Views