Add post-clean command to python setup.py

人走茶凉 提交于 2021-02-09 04:21:13

问题


From resources online, I've learned that the following will add a "post-install" hook if included in setup.py:

from  setuptools  import  setup
from  setuptools.command.install  import  install  as  _install
class  install(_install):
     def  run(self):
         _install.run(self)
         # Do something magical
setup(cmdclass={'install': install})

What I'd like to do, though, is create equivalent behavior after a setup.py clean is executed. Specifically, I'd like setup.py clean to remove the .egg-INFO directory created during the execution of setup.py egg_info.

来源:https://stackoverflow.com/questions/28018117/add-post-clean-command-to-python-setup-py

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!