mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
125 stars 65 forks source link

wheel files are not compressed #519

Closed lazka closed 11 months ago

lazka commented 11 months ago

I haven't looked into it (yet), but while porting from setuptools to meson-python I noticed that the whl files are about twice as large as the setuptools created ones. Zipping the content manually without compression leads to the same file size, so it looks like there is no compression at all maybe (?)

lazka commented 11 months ago

yeah, it creates its own ZipInfo instances but doesn't assign the compression: https://github.com/mesonbuild/meson-python/blob/394a7947394fdcd01fa3ba9aa31af3e9dc498c81/mesonpy/_wheelfile.py#L97-L107

which leads to meson-python creating uncompressed zip files.

lazka commented 11 months ago

https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.writestr even has a note about this problem, so this is likely not the first time this happened :D