The subject is self-descriptive: I need to subclass the setup.py build
command in order to perform additional build steps. However I\'ve failed to find any
For completeness, here is a full example of how to add custom build operations:
import distutils.command.build
# Override build command
class BuildCommand(distutils.command.build.build):
def run(self):
# Run the original build command
distutils.command.build.build.run(self)
# Custom build stuff goes here
# Replace the build command with ours
setup(...,
cmdclass={"build": BuildCommand})