Skip to content

Commit

Permalink
meson: DO not emit absolute path when S != B
Browse files Browse the repository at this point in the history
build systems like OE build outside sourcetree in such cases it works
ok but cython resolves the input file to absolute path and that gets
emitted into genetate _blueman.c as module name, renders the build
non-reproducible, wish cython had a better way to handle this but there
is not, therefore tweak the meson build rule to account for specifying
workdir to cython which will search the inputs correctly, and use
meson's build_root to emit the output into build dir. This ensures that
it becomes independent of source or build directories and cython does
not generate the absolute paths into generate C code.

See cython discussion on [1]

[1] cython/cython#5949

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Aug 26, 2024
1 parent 2682501 commit 99f8cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ blueman_c = custom_target(
'blueman_c',
output: '_blueman.c',
input: '_blueman.pyx',
command: [cython, '--output-file', '@OUTPUT@', '@INPUT@'])
command: [cython, '-w', meson.source_root(), '--output-file', join_paths(meson.build_root(), '@OUTPUT@', '@INPUT@')])

sources = [
blueman_c,
Expand Down

0 comments on commit 99f8cc8

Please sign in to comment.