summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2023-03-25 22:53:59 +0000
committerDylan Baker <dylan@pnwbakers.com>2025-07-18 10:42:18 -0700
commit1c18bcef1f17554e792d2e53ec556f0ec149b5b3 (patch)
tree0d61b71a5213a5105e492060ca31c66529a361bb /test cases
parentd7261815f193a46074217af7c89bf276e965030e (diff)
downloadmeson-1c18bcef1f17554e792d2e53ec556f0ec149b5b3.tar.gz
Fix use of a .pxi Cython include file as source from `configure_file`
Without adding .pxi` as a known header suffix, the added test will fail with: ``` No specified compiler can handle file stuff.pxi ``` Technically only .pxd are header files, and .pxi are "include files" which are literally included in .pyx files. Adding them as headers seems to be fine though, since they're kinda similar and the point is to avoid treating them as source files.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/cython/2 generated sources/meson.build9
1 files changed, 8 insertions, 1 deletions
diff --git a/test cases/cython/2 generated sources/meson.build b/test cases/cython/2 generated sources/meson.build
index d438d8091..3d2837d42 100644
--- a/test cases/cython/2 generated sources/meson.build
+++ b/test cases/cython/2 generated sources/meson.build
@@ -79,13 +79,20 @@ stuff_pxi = fs.copyfile(
'stuff.pxi'
)
+stuff_pxi_2 = configure_file(
+ input: 'stuff.pxi.in',
+ output: 'stuff.pxi',
+ configuration: configuration_data(),
+ install: false
+)
+
# Need to copy the cython source to the build directory
# since meson can only generate the .pxi there
includestuff_pyx = fs.copyfile(
'includestuff.pyx'
)
-stuff_pxi_dep = declare_dependency(sources: stuff_pxi)
+stuff_pxi_dep = declare_dependency(sources: [stuff_pxi, stuff_pxi_2])
includestuff_ext = py3.extension_module(
'includestuff',