mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
meson: Add missing dependencies for utility files for gdbus-codegen
Various parts of the build (such as `objectmanager-rst-gen`) depend on running `gdbus-codegen` after it’s been built, but they currently only encode a dependency to the main codegen Python file and not the supporting files. This can cause `gdbus-codegen` to fail with an `ImportError` if the build races so that `objectmanager-rst-gen` is built before the codegen supporting files. Example failure here: https://gitlab.gnome.org/pwithnall/glib/-/jobs/3266471 ``` FAILED: gio/tests/gdbus-object-manager-example/objectmanager-rst-gen-org.gtk.GDBus.Example.ObjectManager.Animal.rst gio/tests/gdbus-object-manager-example/objectmanager-rst-gen-org.gtk.GDBus.Example.ObjectManager.Cat.rst /usr/bin/python3 gio/gdbus-2.0/codegen/gdbus-codegen --interface-prefix org.gtk.GDBus.Example.ObjectManager. --generate-rst objectmanager-rst-gen --output-directory gio/tests/gdbus-object-manager-example ../gio/tests/gdbus-object-manager-example/gdbus-example-objectmanager.xml Traceback (most recent call last): File "/builds/pwithnall/glib/_build/gio/gdbus-2.0/codegen/gdbus-codegen", line 53, in <module> from codegen import codegen_main File "/builds/pwithnall/glib/_build/gio/gdbus-2.0/codegen/codegen_main.py", line 29, in <module> from . import dbustypes File "/builds/pwithnall/glib/_build/gio/gdbus-2.0/codegen/dbustypes.py", line 22, in <module> from . import utils ImportError: cannot import name 'utils' from 'codegen' (/builds/pwithnall/glib/_build/gio/gdbus-2.0/codegen/__init__.py) ``` Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
This commit is contained in:
parent
aa936e12da
commit
1fdbc06385
@ -20,7 +20,10 @@ gdbus_example_objectmanager_generated = custom_target('objectmanager-gen',
|
|||||||
'--generate-docbook', 'objectmanager-gen',
|
'--generate-docbook', 'objectmanager-gen',
|
||||||
'--symbol-decorator', 'GDBUS_OBJECT_MANAGER_EXAMPLE_AVAILABLE_IN_ALL',
|
'--symbol-decorator', 'GDBUS_OBJECT_MANAGER_EXAMPLE_AVAILABLE_IN_ALL',
|
||||||
'--symbol-decorator-header', 'gdbus-example-objectmanager-visibility.h',
|
'--symbol-decorator-header', 'gdbus-example-objectmanager-visibility.h',
|
||||||
'@INPUT@'])
|
'@INPUT@'],
|
||||||
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
|
)
|
||||||
|
|
||||||
gdbus_example_objectmanager_rst_gen = custom_target('objectmanager-rst-gen',
|
gdbus_example_objectmanager_rst_gen = custom_target('objectmanager-rst-gen',
|
||||||
input: gdbus_example_objectmanager_xml,
|
input: gdbus_example_objectmanager_xml,
|
||||||
@ -36,6 +39,8 @@ gdbus_example_objectmanager_rst_gen = custom_target('objectmanager-rst-gen',
|
|||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
],
|
],
|
||||||
|
depend_files: gdbus_codegen_built_files,
|
||||||
|
depends: gdbus_codegen_built_targets,
|
||||||
)
|
)
|
||||||
|
|
||||||
extra_c_args = []
|
extra_c_args = []
|
||||||
|
@ -373,6 +373,7 @@ if host_machine.system() != 'windows'
|
|||||||
output : ['gdbus-test-codegen-generated.h',
|
output : ['gdbus-test-codegen-generated.h',
|
||||||
'gdbus-test-codegen-generated.c'],
|
'gdbus-test-codegen-generated.c'],
|
||||||
depend_files : gdbus_codegen_built_files,
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.project.',
|
'--interface-prefix', 'org.project.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
@ -389,6 +390,7 @@ if host_machine.system() != 'windows'
|
|||||||
output : ['gdbus-test-codegen-generated-min-required-2-64.h',
|
output : ['gdbus-test-codegen-generated-min-required-2-64.h',
|
||||||
'gdbus-test-codegen-generated-min-required-2-64.c'],
|
'gdbus-test-codegen-generated-min-required-2-64.c'],
|
||||||
depend_files : gdbus_codegen_built_files,
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--glib-min-required', '2.64',
|
'--glib-min-required', '2.64',
|
||||||
'--interface-prefix', 'org.project.',
|
'--interface-prefix', 'org.project.',
|
||||||
@ -405,6 +407,7 @@ if host_machine.system() != 'windows'
|
|||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated-interface-info.h'],
|
output : ['gdbus-test-codegen-generated-interface-info.h'],
|
||||||
depend_files : gdbus_codegen_built_files,
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-info-header',
|
'--interface-info-header',
|
||||||
annotate_args,
|
annotate_args,
|
||||||
@ -414,6 +417,7 @@ if host_machine.system() != 'windows'
|
|||||||
input : ['test-codegen.xml'],
|
input : ['test-codegen.xml'],
|
||||||
output : ['gdbus-test-codegen-generated-interface-info.c'],
|
output : ['gdbus-test-codegen-generated-interface-info.c'],
|
||||||
depend_files : gdbus_codegen_built_files,
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-info-body',
|
'--interface-info-body',
|
||||||
annotate_args,
|
annotate_args,
|
||||||
@ -528,6 +532,7 @@ if host_machine.system() != 'windows'
|
|||||||
output : ['fake-document-portal-generated.h',
|
output : ['fake-document-portal-generated.h',
|
||||||
'fake-document-portal-generated.c'],
|
'fake-document-portal-generated.c'],
|
||||||
depend_files : gdbus_codegen_built_files,
|
depend_files : gdbus_codegen_built_files,
|
||||||
|
depends : gdbus_codegen_built_targets,
|
||||||
command : [python, gdbus_codegen,
|
command : [python, gdbus_codegen,
|
||||||
'--interface-prefix', 'org.freedesktop.portal.',
|
'--interface-prefix', 'org.freedesktop.portal.',
|
||||||
'--output-directory', '@OUTDIR@',
|
'--output-directory', '@OUTDIR@',
|
||||||
|
Loading…
Reference in New Issue
Block a user