Skip to content

Commit 4026e04

Browse files
committed
BLD: document why the Cython copy-tree must stay in meson.build
The generated config.pxi is gone, but the copies still provide the rebuild dependency on .pxd files: Cython's -M depfiles (which Meson's native Cython support relies on) do not record module-namespace cimports such as 'from . cimport c_wt', so dropping the copy-tree would cause stale builds after .pxd edits.
1 parent c9d7c85 commit 4026e04

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎pywt/_extensions/meson.build‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ sources = [
5050
'c/wt.c',
5151
]
5252

53-
# pyx -> c transpile output depends on copied __init__.py and pxd files
53+
# No generated Cython sources are involved anymore, but these copies are
54+
# still needed for correct rebuilds: the `depends: _cython_tree` on the
55+
# generator is what re-cythonizes the .pyx files when a .pxd changes.
56+
# Cython's own depfile output (`cython -M`, used by Meson's native Cython
57+
# support) omits module-namespace cimports like `from . cimport c_wt`
58+
# (seen with Cython 3.2.9), so switching to it would cause stale builds.
5459
_cython_tree = [
5560
fs.copyfile('__init__.py'),
5661
fs.copyfile('common.pxd'),

0 commit comments

Comments
 (0)