I would like to call the C compiler from my setup.py by using platformer instead of Extension(). How do I add a custom build step to setup.py so that it is run with python setup.py build or any of the other build (bdist_*) commands?
I would like to call the C compiler from my setup.py by using platformer
Share
I don’t know what ‘platformer’ is. I assume that you want a complete control over how C extensions are built while providing the same interface for packaging tools.
A possible way: Cython defines its custom built_ext command that could be used as:
A simpler option might be just to include generated C sources into your source tarball and use standard built_ext, Extension classes in setup.py. It would provide the best compatibility with existing tools.