From a2b20affa3ca4a35d195efe9a13a54120fedd6ca Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sat, 3 May 2025 18:17:49 +0200 Subject: [PATCH] BUG: fix a problem with symlink support Modifies the existing `symlinks` test package so it exercises the bug. The situation without a `version` keyword in `meson.build` is more difficult because the dist tarball generated by Meson will be named `-undefined.tar.gz`, which meson-python then changes to ` pathlib.Path: warnings.warn( f'symbolic link pointing to a directory ignored: {name}', stacklevel=1) + # Copy `member` before starting to modify it + member = copy.copy(member) + if member.isfile(): file = meson_dist.extractfile(member.name) diff --git a/tests/packages/symlinks/meson.build b/tests/packages/symlinks/meson.build index a4cd913a3..b994b0440 100644 --- a/tests/packages/symlinks/meson.build +++ b/tests/packages/symlinks/meson.build @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: MIT -project('symlinks', version: '1.0.0') +project('symlinks') py = import('python').find_installation() diff --git a/tests/packages/symlinks/pyproject.toml b/tests/packages/symlinks/pyproject.toml index 0e67ab758..5a290eec3 100644 --- a/tests/packages/symlinks/pyproject.toml +++ b/tests/packages/symlinks/pyproject.toml @@ -5,3 +5,7 @@ [build-system] build-backend = 'mesonpy' requires = ['meson-python'] + +[project] +name = 'symlinks' +version = '1.0.0'