1#!/usr/local/bin/python3.8
2# EASY-INSTALL-ENTRY-SCRIPT: 'meson==0.60.3','console_scripts','meson'
3import re
4import sys
5
6# for compatibility with easy_install; see #2198
7__requires__ = 'meson==0.60.3'
8
9try:
10    from importlib.metadata import distribution
11except ImportError:
12    try:
13        from importlib_metadata import distribution
14    except ImportError:
15        from pkg_resources import load_entry_point
16
17
18def importlib_load_entry_point(spec, group, name):
19    dist_name, _, _ = spec.partition('==')
20    matches = (
21        entry_point
22        for entry_point in distribution(dist_name).entry_points
23        if entry_point.group == group and entry_point.name == name
24    )
25    return next(matches).load()
26
27
28globals().setdefault('load_entry_point', importlib_load_entry_point)
29
30
31if __name__ == '__main__':
32    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
33    sys.exit(load_entry_point('meson==0.60.3', 'console_scripts', 'meson')())
34