which.py 378 B

123456789101112131415161718192021
  1. import os
  2. from ..utils import deps
  3. from ..utils.log import log
  4. __all__ = ['execute']
  5. def _unpack_args(args):
  6. '''Unpack command line arguments
  7. '''
  8. return (args.binary,)
  9. def execute(binary):
  10. '''Print the location of a binary dependency
  11. '''
  12. path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
  13. if os.path.exists(path):
  14. print(path)