From patchwork Fri Apr 29 19:17:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5, of, 7, v3, stable, osx-packaging] hghave: add check for OS X packaging tools From: Kevin Bullock X-Patchwork-Id: 14835 Message-Id: <948a2528c44c808a844f.1461957428@billings.local> To: mercurial-devel@mercurial-scm.org Cc: augie@google.com Date: Fri, 29 Apr 2016 14:17:08 -0500 # HG changeset patch # User Augie Fackler # Date 1461771955 14400 # Wed Apr 27 11:45:55 2016 -0400 # Branch stable # Node ID 948a2528c44c808a844fc36de1cdbb66099299ab # Parent f885dd89a93375b64479b8c2d1e40b8cb6f9adb5 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'