comparison tests/hghave.py @ 26110:2dcfb98c5314

hghave: add a check for debian packaging tools
author Augie Fackler <augie@google.com>
date Tue, 25 Aug 2015 00:03:15 -0400
parents bad09bd22b6a
children dcc12365fa38
comparison
equal deleted inserted replaced
26109:bad09bd22b6a 26110:2dcfb98c5314
412 412
413 @check("osx", "OS X") 413 @check("osx", "OS X")
414 def has_osx(): 414 def has_osx():
415 return sys.platform == 'darwin' 415 return sys.platform == 'darwin'
416 416
417 @check("debhelper", "debian packaging tools")
418 def has_debhelper():
419 dpkg = matchoutput('dpkg --version',
420 "Debian `dpkg' package management program")
421 dh = matchoutput('dh --help',
422 'dh is a part of debhelper.')
423 dh_py2 = matchoutput('dh_python2 --help',
424 'other supported Python versions')
425 return dpkg and dh and dh_py2
426
417 @check("absimport", "absolute_import in __future__") 427 @check("absimport", "absolute_import in __future__")
418 def has_absimport(): 428 def has_absimport():
419 import __future__ 429 import __future__
420 from mercurial import util 430 from mercurial import util
421 return util.safehasattr(__future__, "absolute_import") 431 return util.safehasattr(__future__, "absolute_import")