# HG changeset patch # User Augie Fackler # Date 2016-04-27 15:45:55 # Node ID 80f15aa32eddc3917172e9afe418f85c6699a2b8 # Parent f2549b0ba9ab60724bac6edf22c2b91a3db94f2f hghave: add check for OS X packaging tools diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -464,6 +464,19 @@ def has_bdistmpkg(): except ImportError: return False +@check("osxpackaging", "OS X packaging tools") +def has_osxpackaging(): + try: + return (matchoutput('pkgbuild', 'Usage: pkgbuild ', ignorestatus=1) + and matchoutput( + 'productbuild', 'Usage: productbuild ', + ignorestatus=1) + and matchoutput('lsbom', 'Usage: lsbom', ignorestatus=1) + and matchoutput( + 'xar --help', 'Usage: xar', ignorestatus=1)) + except ImportError: + return False + @check("docker", "docker support") def has_docker(): pat = r'A self-sufficient runtime for'