Skip to content

Commit afeb695

Browse files
committed
print tool location along with version
1 parent 6ec067d commit afeb695

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

cue.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from glob import glob
1414
import subprocess as sp
1515
import distutils.util
16+
import shutil
1617

1718
logger = logging.getLogger(__name__)
1819

@@ -32,6 +33,11 @@ def log_modified():
3233
sys.stdout.write(F.read())
3334
sys.stdout.write(os.linesep)
3435

36+
def whereis(cmd):
37+
if hasattr(shutil, 'which'): # >= py3.3
38+
loc = shutil.which(cmd)
39+
print('{0}Found exec {1} at {2!r} {3}'.format(ANSI_CYAN, cmd, loc, ANSI_RESET))
40+
3541
def prepare_env():
3642
'''HACK
3743
github actions yaml configuration doesn't allow
@@ -1246,23 +1252,28 @@ def prepare(args):
12461252
setup_for_build(args)
12471253

12481254
print('{0}EPICS_HOST_ARCH = {1}{2}'.format(ANSI_CYAN, os.environ['EPICS_HOST_ARCH'], ANSI_RESET))
1255+
whereis('make')
12491256
print('{0}$ make --version{1}'.format(ANSI_CYAN, ANSI_RESET))
12501257
sys.stdout.flush()
12511258
call_make(['--version'], parallel=0)
1259+
whereis('perl')
12521260
print('{0}$ perl --version{1}'.format(ANSI_CYAN, ANSI_RESET))
12531261
sys.stdout.flush()
12541262
sp.check_call(['perl', '--version'])
12551263

12561264
if re.match(r'^vs', ci['compiler']):
1265+
whereis('cl')
12571266
print('{0}$ cl{1}'.format(ANSI_CYAN, ANSI_RESET))
12581267
sys.stdout.flush()
12591268
sp.check_call(['cl'])
12601269
else:
12611270
cc = ci['compiler']
1271+
whereis(cc)
12621272
print('{0}$ {1} --version{2}'.format(ANSI_CYAN, cc, ANSI_RESET))
12631273
sys.stdout.flush()
12641274
sp.check_call([cc, '--version'])
12651275
if cxx:
1276+
whereis(cxx)
12661277
print('{0}$ {1} --version{2}'.format(ANSI_CYAN, cxx, ANSI_RESET))
12671278
sys.stdout.flush()
12681279
sp.check_call([cxx, '--version'])

0 commit comments

Comments
 (0)