Quick question, how do I make a function available...
# general
d
Quick question, how do I make a function available in a pants BUILD file. I've noticed the warn against direct imports, and I can't seem to find in the documentation how to do it. i.e.
setup_py
is available as a function call, would like to be able to allow my own function calls. I'm familiar with the plugin setup, but can't seem to be able to wire this piece together
a
this is the
objects
part of BuildFileAliases
d
So something along the lines of register.py
Copy code
def build_file_aliases():
  def my_func():
    pass
  return BuildFileAliases(
    objects={
      'my_func' : my_func
     }
  )
👍 1
a
yes! sorry, was in a meeting immediately after responding to that lol
you can also import the func from elsewhere
👍 1