def create_cmdclass(wrappers=None):
"""Create a command class with the given optional wrappers.
Parameters
----------
wrappers: list(str), optional
The cmdclass names to run before running other commands
"""
egg = bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled
wrappers = wrappers or []
wrapper = functools.partial(wrap_command, wrappers)
cmdclass = dict(
build_py=wrapper(build_py, strict=is_repo),
sdist=wrapper(sdist, strict=True),
bdist_egg=egg,
develop=wrapper(develop, strict=True)
)
if bdist_wheel:
cmdclass['bdist_wheel'] = wrapper(bdist_wheel, strict=True)
return cmdclass
评论列表
文章目录