Skip to content

Commit e2a5e9b

Browse files
committed
TST: make test the same with all Meson versions and avoid a warning
1 parent ca0fe7a commit e2a5e9b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

tests/packages/subproject/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ requires = ['meson-python']
88

99
[tool.meson-python.wheel]
1010
exclude = [
11-
# Meson before version 1.3.0 install data files in
12-
# ``{datadir}/{project name}/``, later versions install
13-
# in the more correct ``{datadir}/{subproject name}/``.
14-
'{datadir}/*/data.txt',
11+
'{datadir}/dep/*.txt',
1512
'{py_purelib}/dep.*',
1613
]
1714
include = [

tests/packages/subproject/subprojects/dep/meson.build

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ project('dep')
66

77
py = import('python').find_installation()
88

9-
py.install_sources('dep.py')
9+
py.install_sources(
10+
'dep.py',
11+
)
1012

11-
install_data('data.txt')
13+
install_data(
14+
'data.txt',
15+
# Prior to meson 1.3.0, the default install path for subproject data files
16+
# is ``{datadir}/{main-project-name}/``. In later versions it is the more
17+
# correct ``{datadir}/{subproject-name}/``. Specify the install path to
18+
# obtain uniform behavior across different meson versions.
19+
install_dir: '{datadir}' / meson.project_name(),
20+
)

0 commit comments

Comments
 (0)