I have integrated ahead-of-time compilation as described in https://numba.pydata.org/numba-doc/dev/user/pycc.html#distutils-integration but when building the package like
python3 setup.py sdist bdist_wheel and uploading the module to https://test.pypi.org/ with
twine upload --repository-url https://test.pypi.org/legacy/ dist/*, I get the error message:
HTTPError: 400 Bad Request from https://test.pypi.org/legacy/ Binary wheel 'MyModule-1.0.0-cp37-cp37m-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'.
Instead, I could build a source-only package with
python3 setup.py sdist, but then the module won’t be aot-compiled and
import will fail. A solution might be to aot-compile the module on first import, but I am not sure where to put the resulting shared library file for each possible platform.