https://pantsbuild.org/ logo
h

hundreds-father-404

05/28/2020, 7:18 PM
fyi I added docs on the new macros feature: https://pants.readme.io/docs/macros
cc @average-vr-56795 if you have a moment to sanity check them. Thanks again for adding the feature!
a

average-vr-56795

05/28/2020, 7:51 PM
Looks great šŸ™‚ One thing Iā€™d add an example of is that a macro can make multiple targets. An example in keeping with your existing ones could be:
Copy code
def python23_tests(name, **kwargs):
  kwargs.pop("compatibility", None)

  python_tests(
    name = name + "_py2",
    compatibility = "==2.7.*",
    **kwargs
  )

  python_tests(
    name = name + "_py3",
    compatibility = ">=3.5",
    **kwargs
  )
šŸ‘ 1