Closed
Description
While reviewing #340, I found that we are not actually using the Meson install directory to copy files to the wheel, and instead we are copying them from the build directory.
This has two problems I can identify:
- The files get installed with a wrong
RPATH
- This is because Meson sets the
RPATH
so that you can run stuff from the build directory
- This is because Meson sets the
- Exclusion parameters to
install_subdir
are ignored- This is because Meson does not export them in the metadata, so we just copy the whole directory, but we can only rely on copying from the install location, as that's the only place which will have the correct tree installed
Reproducible with all examples from the install_subdir
docs:
# SPDX-FileCopyrightText: 2023 The meson-python developers
#
# SPDX-License-Identifier: MIT
project('install-subdir-exclude', version: '1.0.0')
py = import('python').find_installation()
purelib = py.get_path('purelib')
install_subdir(
'foo',
install_dir: purelib / 'subdir1',
strip_directory : false,
)
install_subdir(
'foo',
install_dir: purelib / 'subdir2',
strip_directory : false,
)
install_subdir(
'foo/bar',
install_dir: purelib / 'subdir3',
strip_directory : false,
)
install_subdir(
'foo/bar',
install_dir: purelib / 'subdir4',
strip_directory : true,
)
install_subdir(
'new_directory',
install_dir: purelib,
)