Skip to content

Commit 9155036

Browse files
committed
TST: fix test package meson.build
The package is never used to build a wheel thus this fixes only a theoretical problem. But better have correct code in out codebase. Fixes #295.
1 parent b332e56 commit 9155036

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

tests/packages/subdirs/meson.build

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5-
project(
6-
'subdirs',
7-
version: '1.0.0',
8-
)
5+
project('subdirs', version: '1.0.0')
96

10-
py_mod = import('python')
11-
py = py_mod.find_installation()
7+
py = import('python').find_installation()
128

13-
py.install_sources([
14-
'subdirs' / '__init__.py',
15-
'subdirs' / 'a' / '__init__.py',
16-
'subdirs' / 'a' / 'b' / 'c.py',
17-
'subdirs' / 'b' / 'c.py',
18-
])
9+
# in Meson >= 0.64 this could be replace with a single
10+
# py.install_sources() with the 'preserve_path: true' argument.
11+
py.install_sources(
12+
'subdirs/__init__.py',
13+
subdir: 'subdirs')
14+
py.install_sources(
15+
'subdirs/a/__init__.py',
16+
subdir: 'subdirs/a')
17+
py.install_sources(
18+
'subdirs/a/b/c.py',
19+
subdir: 'subdirs/a/b')
20+
py.install_sources(
21+
'subdirs/b/c.py',
22+
subdir: 'subdirs/b')

0 commit comments

Comments
 (0)