Closed ankith26 closed 4 months ago
Thanks for the report @ankith26. I think your comment is correct - my understanding is that Windows import libraries (the .lib
files you are seeing) should not be shipped to end users. They're only ~500 bytes per file so the size shouldn't matter too much, but it is a little sloppy.
I checked the numpy
wheels, and they contain .lib
files for 1.26.x (built with Meson) and not for 1.25.x (built with distutils
).
These files are generated at build time and marked for install by Meson with a devel
tag in intro-install_plan.json
. The corresponding .pyd
files have a runtime
tag. meson-python has to install all files by default, but you can avoid installing devel
files by selecting only the runtime
and python-runtime
tags; see https://mesonbuild.com/meson-python/how-to-guides/meson-args.html#how-to-guides-meson-args for how to add this to your pyproject.toml
. Note that if you're installing other devel
files (e.g., headers), this may not be as easy.
I'm not sure if there's anything that should change in Meson or meson-python's defaults. I suspect it's a little tricky, because:
intro-install_plan.json
is correct probably; .lib
files are devel files and while not useful as part of wheels, may be needed for other purposes in Windows builds.lib
files specifically, but it feels hard to do because static libraries that are meant to be shipped also have the .lib
extension and the devel
tagI used the tag workaround you suggested, thanks!
Thanks for the confirmation @ankith26. I forgot to close this earlier, but we're all good here it looks like.
This looks like a windows only thing where I see a
.lib
file for every.pyd
file made by meson-python. In my understanding, these files would be unneeded, so they just increase the wheelsize while not being useful. Is there any reason for having these, and if not, can these be not installed?