summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-17 20:13:14 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-17 20:30:30 +0300
commit9f00e78bf5a6b311c6d0e72b7c79f793863ea942 (patch)
treefcf26248a5f17360eb9a1cea6f51c179e82f3957
parent5efb6c8e2acdc2dc9edf1f22f6c2a5818062b69e (diff)
py: Fix link generation to __init__.py
The command to create a symlink to the __init__.py file in the source directory uses a relative path from the build directory, which hardcodes the assumption that the build directory is a direct child of the source directory. This isn't always true. Fix it by using the files() function. Fixes: 8aa02271fd71 ("Add Python bindings") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
-rw-r--r--src/py/libcamera/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index 0cd7c75b..2fc2eaec 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -54,7 +54,7 @@ pycamera = shared_module('_libcamera',
dependencies : pycamera_deps,
cpp_args : pycamera_args)
-run_command('ln', '-fsT', '../../../../src/py/libcamera/__init__.py',
+run_command('ln', '-fsT', files('__init__.py'),
meson.current_build_dir() / '__init__.py',
check: true)