Remove the shebang from gen_dispatch.py

Instead of having Meson determine the invocator through the shebang
line we explicitly pass the script file to the Python interpreter.

This will allow us to either use Python3 or Python2, or whatever
Python.exe is available on Windows.
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent b5d921ae45
commit 89f9aa044f
  1. 4
      include/epoxy/meson.build
  2. 5
      meson.build
  3. 1
      src/gen_dispatch.py
  4. 4
      src/meson.build

@ -6,6 +6,7 @@ gl_generated = custom_target('gl_generated.h',
'gl_generated.h', 'gl_generated.h',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--header', '--header',
'--no-source', '--no-source',
@ -25,6 +26,7 @@ if build_egl
'egl_generated.h', 'egl_generated.h',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--header', '--header',
'--no-source', '--no-source',
@ -44,6 +46,7 @@ if build_glx
'glx_generated.h', 'glx_generated.h',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--header', '--header',
'--no-source', '--no-source',
@ -63,6 +66,7 @@ if build_wgl
'wgl_generated.h', 'wgl_generated.h',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--header', '--header',
'--no-source', '--no-source',

@ -202,8 +202,11 @@ configure_file(input: 'epoxy.pc.in',
install: true, install: true,
install_dir: join_paths(epoxy_libdir, 'pkgconfig')) install_dir: join_paths(epoxy_libdir, 'pkgconfig'))
# Python
python = find_program('python', required: true)
# Generates the dispatch tables # Generates the dispatch tables
gen_dispatch_py = find_program('src/gen_dispatch.py') gen_dispatch_py = join_paths(meson.source_root(), 'src/gen_dispatch.py')
gl_registry = files('registry/gl.xml') gl_registry = files('registry/gl.xml')
egl_registry = files('registry/egl.xml') egl_registry = files('registry/egl.xml')

@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright © 2013 Intel Corporation # Copyright © 2013 Intel Corporation

@ -12,6 +12,7 @@ gl_generated = custom_target('gl_generated_dispatch.c',
'gl_generated_dispatch.c', 'gl_generated_dispatch.c',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--source', '--source',
'--no-header', '--no-header',
@ -29,6 +30,7 @@ if build_egl
'egl_generated_dispatch.c', 'egl_generated_dispatch.c',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--source', '--source',
'--no-header', '--no-header',
@ -46,6 +48,7 @@ if build_glx
'glx_generated_dispatch.c', 'glx_generated_dispatch.c',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--source', '--source',
'--no-header', '--no-header',
@ -63,6 +66,7 @@ if build_wgl
'wgl_generated_dispatch.c', 'wgl_generated_dispatch.c',
], ],
command: [ command: [
python,
gen_dispatch_py, gen_dispatch_py,
'--source', '--source',
'--no-header', '--no-header',

Loading…
Cancel
Save