我花了一天时间浏览distutils源码,以了解足够的知识来制作一堆自定义命令。它虽然不漂亮,但确实有效。
import distutils.corefrom distutils.command.install import install...class my_install(install): def run(self): install.run(self) # Custom stuff here # distutils.command.install actually has some nice helper methods # and interfaces. I strongly suggest reading the docstrings....distutils.core.setup(..., cmdclass=dict(install=my_install), ...)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)