Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce mypy/c package size, using -g0 CFLAG #849

Closed
erny opened this issue May 3, 2021 · 2 comments · Fixed by mypyc/mypy_mypyc-wheels#63
Closed

Reduce mypy/c package size, using -g0 CFLAG #849

erny opened this issue May 3, 2021 · 2 comments · Fixed by mypyc/mypy_mypyc-wheels#63
Labels
enhancement Improvements to existing logic or features.

Comments

@erny
Copy link

erny commented May 3, 2021

Thanks for this great piece of software!

The problem: I use install mypy in docker images so the distribution includes full testing capabilities. When I install from pypi, I get complete mypy with mypyc in my x86_64 docker image (based on python-slim / debian based images)

For mypy-0.820+dev the wheel for CPython 3.8 is currently about 29MB, and uncompressed about 109MB in Linux x86_64.

Adding the -g0 compile flag (excluding debug info from binaries) in build.py, the wheel size is reduced to 11MB and uncompressed to 37MB.

So it would be cool to have a debug flag or anything to control an optional -g0 compiler flag (or the corresponding Darwin / Windows CFLAGS).

Thanks.

@JukkaL
Copy link
Collaborator

JukkaL commented May 24, 2021

This sounds reasonable. We don't really need the debug information for anything, I think.

@ichard26
Copy link
Collaborator

As far as I can tell, while the mypycify entrypoint now supports a debug_level keyword argument, mypy's wheel build set up doesn't override the default of 1. Probably worth doing that? cc @hauntsaninja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing logic or features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants