diff --git a/glfw/glfw.py b/glfw/glfw.py index 28ff4a373..6193d0ec6 100755 --- a/glfw/glfw.py +++ b/glfw/glfw.py @@ -102,40 +102,6 @@ def build_wayland_protocols(env, run_tool, emphasis, newer, dest_dir): desc='Generating {} ...'.format(emphasis(os.path.basename(dest)))) -def collect_source_information(): - raw = open('src/CMakeLists.txt').read() - mraw = open('CMakeLists.txt').read() - - def extract_sources(group, start_pos=0): - for which in 'HEADERS SOURCES'.split(): - yield which.lower(), list(filter( - lambda x: x[0] not in '"$', - re.search( - r'{0}_{1}\s+([^)]+?)[)]'.format(group, which), - raw[start_pos:] - ).group(1).strip().split() - )) - - wayland_protocols = re.search(r'WaylandProtocols\s+(\S+)\s+', mraw).group(1) - wayland_protocols = list(map(int, wayland_protocols.split('.'))) - ans = { - 'common': dict(extract_sources('common')), - 'wayland_protocols': wayland_protocols, - } - for group in 'cocoa win32 x11 wayland osmesa'.split(): - m = re.search('_GLFW_' + group.upper(), raw) - ans[group] = dict(extract_sources('glfw', m.start())) - if group in ('x11', 'wayland'): - for joystick in ('linux', 'null'): - ans[group]['headers'].append('{}_joystick.h'.format(joystick)) - ans[group]['sources'].append('{}_joystick.c'.format(joystick)) - if group == 'wayland': - ans[group]['protocols'] = p = [] - for m in re.finditer(r'WAYLAND_PROTOCOLS_PKGDATADIR\}/(.+?)"?$', raw, flags=re.M): - p.append(m.group(1)) - return ans - - class Arg: def __init__(self, decl):