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 build
command class to inherit from. I've been trying:
class BuildCommandProxy(setuptools.command.build):
pass
and
class BuildCommandProxy(distutils.command.build):
pass
and even:
class BuildCommandProxy(setuptools.distutils.command.build):
pass
without any success.
UPDATE: looking for how to implement something like this with setuptools
.
UPDATE2: I have some custom command implementation:
class CustomCommand(setuptools.Command):
# ...
What I would like to implement is to pass this command to cmdclass
like this:
cmdclass={
"build": CustomCommand,
}
and then invoke the original build
in CustomCommand.run
after doing some custom steps.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…