| 1 |
sources = [ |
| 2 |
'pygboxed.c', |
| 3 |
'pygenum.c', |
| 4 |
'pygflags.c', |
| 5 |
'pyginterface.c', |
| 6 |
'pygobject-class.c', |
| 7 |
'pygobject-object.c', |
| 8 |
'pygobject-props.c', |
| 9 |
'pygpointer.c', |
| 10 |
'pygspawn.c', |
| 11 |
'gimodule.c', |
| 12 |
'pygi-capi.c', |
| 13 |
'pygi-repository.c', |
| 14 |
'pygi-info.c', |
| 15 |
'pygi-foreign.c', |
| 16 |
'pygi-struct.c', |
| 17 |
'pygi-source.c', |
| 18 |
'pygi-argument.c', |
| 19 |
'pygi-resulttuple.c', |
| 20 |
'pygi-async.c', |
| 21 |
'pygi-type.c', |
| 22 |
'pygi-boxed.c', |
| 23 |
'pygi-closure.c', |
| 24 |
'pygi-ccallback.c', |
| 25 |
'pygi-util.c', |
| 26 |
'pygi-property.c', |
| 27 |
'pygi-signal-closure.c', |
| 28 |
'pygi-invoke.c', |
| 29 |
'pygi-cache.c', |
| 30 |
'pygi-cache-array.c', |
| 31 |
'pygi-cache-basic.c', |
| 32 |
'pygi-cache-closure.c', |
| 33 |
'pygi-cache-enum.c', |
| 34 |
'pygi-cache-error.c', |
| 35 |
'pygi-cache-hashtable.c', |
| 36 |
'pygi-cache-interface.c', |
| 37 |
'pygi-cache-list.c', |
| 38 |
'pygi-cache-object.c', |
| 39 |
'pygi-cache-struct.c', |
| 40 |
'pygi-marshal-cleanup.c', |
| 41 |
'pygi-basictype.c', |
| 42 |
'pygi-error.c', |
| 43 |
'pygi-fundamental.c', |
| 44 |
'pygi-value.c', |
| 45 |
] |
| 46 |
|
| 47 |
headers = [ |
| 48 |
'pygobject.h', |
| 49 |
'pygobject-types.h' |
| 50 |
] |
| 51 |
|
| 52 |
install_headers(headers, subdir : 'pygobject-@0@'.format(platform_version)) |
| 53 |
|
| 54 |
python_sources = [ |
| 55 |
'events.py', |
| 56 |
'_constants.py', |
| 57 |
'docstring.py', |
| 58 |
'_enum.py', |
| 59 |
'_error.py', |
| 60 |
'_gtktemplate.py', |
| 61 |
'importer.py', |
| 62 |
'__init__.py', |
| 63 |
'module.py', |
| 64 |
'_ossighelper.py', |
| 65 |
'_propertyhelper.py', |
| 66 |
'_signalhelper.py', |
| 67 |
'_signature.py', |
| 68 |
'types.py', |
| 69 |
] |
| 70 |
|
| 71 |
python.install_sources(python_sources, |
| 72 |
pure : false, |
| 73 |
subdir : 'gi' |
| 74 |
) |
| 75 |
|
| 76 |
# https://github.com/mesonbuild/meson/issues/4117 |
| 77 |
if host_machine.system() == 'windows' |
| 78 |
python_ext_dep = python_dep |
| 79 |
else |
| 80 |
python_ext_dep = python_dep.partial_dependency(compile_args: true) |
| 81 |
endif |
| 82 |
|
| 83 |
configure_file(output : 'config.h', configuration : cdata) |
| 84 |
|
| 85 |
giext = python.extension_module('_gi', sources, |
| 86 |
dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep, pythoncapi_compat_dep], |
| 87 |
install: true, |
| 88 |
subdir : 'gi', |
| 89 |
c_args: pyext_c_args + main_c_args + ['-D_INSIDE_PYGOBJECT_'] |
| 90 |
) |
| 91 |
|
| 92 |
if cairo_dep.found() |
| 93 |
gicairoext = python.extension_module('_gi_cairo', ['pygi-foreign-cairo.c'], |
| 94 |
dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep, pycairo_dep, cairo_dep, cairo_gobject_dep, pythoncapi_compat_dep], |
| 95 |
install: true, |
| 96 |
subdir : 'gi', |
| 97 |
c_args: pyext_c_args + main_c_args) |
| 98 |
endif |
| 99 |
|
| 100 |
subdir('overrides') |
| 101 |
subdir('repository') |