libcamera/utils/codegen/meson.build
Laurent Pinchart 5c1cb5e5bc py: gen-py-controls: Use Control class
Replace manual extraction of data from YAML with the Control helper
class. This centralizes YAML parsing and avoids manual mistakes.

In order to import the controls module, add the utils/codegen/ directory
to the PYTHONPATH through the Python build environment.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-08-16 00:28:32 +03:00

18 lines
518 B
Meson

# SPDX-License-Identifier: CC0-1.0
## Code generation
py_build_env = environment()
# \todo Investigate usage of PYTHONPYCACHEPREFIX for Python >= 3.8
py_build_env.set('PYTHONDONTWRITEBYTECODE', '1')
py_build_env.prepend('PYTHONPATH', meson.current_source_dir())
py_modules += ['jinja2', 'yaml']
gen_controls = files('gen-controls.py')
gen_formats = files('gen-formats.py')
gen_header = files('gen-header.sh')
gen_ipa_pub_key = files('gen-ipa-pub-key.py')
gen_tracepoints = files('gen-tp-header.py')
subdir('ipc')