Python source modules are ignored when pure:true is specified and C extensions are present
When building packages using meson
and mesonpep517
source modules added using
python.install_sources(
...,
pure:true,
)
are ignored when C extensions added by
python.extension_module(..., install:true, subdir:'foo')
are present. Note that when subdir
is omitted no binaries are included in the
wheels (this is related to mesonbuild/meson#6331).
The problem can be fixed by specifying pure:false
. However, this is not
documented either in mesonpep517
's docs nor in meson
's docs (and it will
not be fixed there).
I made a toy repository showing the two cases on GitLab and on GitHub.
The master branch shows the working example, pure_sources
shows the missing python source modules when pure:true
is specified.
To reproduce run python3 -m build .
and inspect the wheel under dist/
.