xref: /aosp_15_r20/external/autotest/frontend/client/gwt_dir (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1#!/usr/bin/python3
2#
3# Find the GWT installation and print its location to stdout.
4
5import os, sys
6
7DEFAULT_GWT = '/usr/local/lib/gwt'
8
9site_gwt = os.path.abspath(os.path.join(
10        os.path.dirname(__file__), '..', '..', 'site-packages', 'gwt'))
11
12if os.path.isdir(site_gwt):
13    print(site_gwt)
14    sys.exit(0)
15
16if not os.path.isdir(DEFAULT_GWT):
17    sys.stderr.write('(%s): GWT not installed?\n' % __file__)
18
19print(DEFAULT_GWT)
20
21