Summary
We can precompile some parts of the code to slightly improve performance, thanks to the typed code, mypyc will compile the *.c extension for the files
It will look something like this:
setup.py:
import os
from setuptools import setup
if os.environ.get("USE_MYPYC") == "1":
import glob
from mypyc.build import mypycify
files = glob.glob("src/**/*.py", recursive=True)
ext_modules = mypycify(files)
else:
ext_modules = []
setup(ext_modules=ext_modules)
We could either leave it up to the user, or compile the wheels ourselves and publish them to PyPI. The latter, however, would significantly increase CI runtime.
Summary
We can precompile some parts of the code to slightly improve performance, thanks to the typed code, mypyc will compile the
*.cextension for the filesIt will look something like this:
setup.py:We could either leave it up to the user, or compile the wheels ourselves and publish them to PyPI. The latter, however, would significantly increase CI runtime.