diff options
author | Daniele Nicolodi <daniele@grinta.net> | 2025-07-20 16:56:49 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2025-07-22 13:23:16 -0700 |
commit | c07eb44c2b54025a98162e0ccd4c70c0f9b2d244 (patch) | |
tree | 5f9336a782c288491b4be571fc0b6e192fc717dc | |
parent | 3114bc65885a7499f5a255e76875fa88010e8589 (diff) | |
download | meson-master.zip meson-master.tar.gz meson-master.tar.bz2 |
This is required by meson-python to fix RPATH entries when building a wheel.
-rw-r--r-- | mesonbuild/mintro.py | 7 | ||||
-rw-r--r-- | unittests/allplatformstests.py | 20 |
2 files changed, 24 insertions, 3 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 57fa286..e19e528 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -125,14 +125,15 @@ def list_installed(installdata: backends.InstallData) -> T.Dict[str, str]: res[basename] = os.path.join(installdata.prefix, s.install_path, basename) return res -def list_install_plan(installdata: backends.InstallData) -> T.Dict[str, T.Dict[str, T.Dict[str, T.Optional[str]]]]: - plan: T.Dict[str, T.Dict[str, T.Dict[str, T.Optional[str]]]] = { +def list_install_plan(installdata: backends.InstallData) -> T.Dict[str, T.Dict[str, T.Dict[str, T.Union[str, T.List[str], None]]]]: + plan: T.Dict[str, T.Dict[str, T.Dict[str, T.Union[str, T.List[str], None]]]] = { 'targets': { Path(installdata.build_dir, target.fname).as_posix(): { 'destination': target.out_name, 'tag': target.tag or None, 'subproject': target.subproject or None, - 'install_rpath': target.install_rpath or None + 'install_rpath': target.install_rpath or None, + 'build_rpaths': sorted(x.decode('utf8') for x in target.rpath_dirs_to_remove), } for target in installdata.targets }, diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 905ae4d..c006961 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -4812,120 +4812,140 @@ class AllPlatformTests(BasePlatformTests): expected = { 'targets': { get_path(f'{self.builddir}/out1-notag.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out1-notag.txt', 'install_rpath': None, 'tag': None, 'subproject': None, }, get_path(f'{self.builddir}/out2-notag.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out2-notag.txt', 'install_rpath': None, 'tag': None, 'subproject': None, }, get_path(f'{self.builddir}/libstatic.a'): { + 'build_rpaths': [], 'destination': '{libdir_static}/libstatic.a', 'install_rpath': None, 'tag': 'devel', 'subproject': None, }, get_path(f'{self.builddir}/' + exe_name('app')): { + 'build_rpaths': [], 'destination': '{bindir}/' + exe_name('app'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/' + exe_name('app-otherdir')): { + 'build_rpaths': [], 'destination': '{prefix}/otherbin/' + exe_name('app-otherdir'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/subdir/' + exe_name('app2')): { + 'build_rpaths': [], 'destination': '{bindir}/' + exe_name('app2'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/' + shared_lib_name('shared')): { + 'build_rpaths': [], 'destination': '{libdir_shared}/' + shared_lib_name('shared'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/' + shared_lib_name('both')): { + 'build_rpaths': [], 'destination': '{libdir_shared}/' + shared_lib_name('both'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/' + static_lib_name('both')): { + 'build_rpaths': [], 'destination': '{libdir_static}/' + static_lib_name('both'), 'install_rpath': None, 'tag': 'devel', 'subproject': None, }, get_path(f'{self.builddir}/' + shared_lib_name('bothcustom')): { + 'build_rpaths': [], 'destination': '{libdir_shared}/' + shared_lib_name('bothcustom'), 'install_rpath': None, 'tag': 'custom', 'subproject': None, }, get_path(f'{self.builddir}/' + static_lib_name('bothcustom')): { + 'build_rpaths': [], 'destination': '{libdir_static}/' + static_lib_name('bothcustom'), 'install_rpath': None, 'tag': 'custom', 'subproject': None, }, get_path(f'{self.builddir}/subdir/' + shared_lib_name('both2')): { + 'build_rpaths': [], 'destination': '{libdir_shared}/' + shared_lib_name('both2'), 'install_rpath': None, 'tag': 'runtime', 'subproject': None, }, get_path(f'{self.builddir}/subdir/' + static_lib_name('both2')): { + 'build_rpaths': [], 'destination': '{libdir_static}/' + static_lib_name('both2'), 'install_rpath': None, 'tag': 'devel', 'subproject': None, }, get_path(f'{self.builddir}/out1-custom.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out1-custom.txt', 'install_rpath': None, 'tag': 'custom', 'subproject': None, }, get_path(f'{self.builddir}/out2-custom.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out2-custom.txt', 'install_rpath': None, 'tag': 'custom', 'subproject': None, }, get_path(f'{self.builddir}/out3-custom.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out3-custom.txt', 'install_rpath': None, 'tag': 'custom', 'subproject': None, }, get_path(f'{self.builddir}/subdir/out1.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out1.txt', 'install_rpath': None, 'tag': None, 'subproject': None, }, get_path(f'{self.builddir}/subdir/out2.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out2.txt', 'install_rpath': None, 'tag': None, 'subproject': None, }, get_path(f'{self.builddir}/out-devel.h'): { + 'build_rpaths': [], 'destination': '{includedir}/out-devel.h', 'install_rpath': None, 'tag': 'devel', 'subproject': None, }, get_path(f'{self.builddir}/out3-notag.txt'): { + 'build_rpaths': [], 'destination': '{datadir}/out3-notag.txt', 'install_rpath': None, 'tag': None, |