Difference between setup.py install and setup.py develop

佐手、 提交于 2019-12-18 04:12:41

问题


I am trying to improve my workflow when developing python modules and have a rather basic question.

What exactly happens when choosing either option. To my knowledge develop leaves the files in place so I can modify them and play around with the package whereas install copies them in the site-packages folder of my python installation. How is the package linked to my python installation when using the develop option.


回答1:


develop creates an .egg-link file in the site-packages directory, which points back to the location of the project files. The same path is also added to the easy-install.pth file in the same location. Uninstalling with setup.py develop -u removes that link file again.

Do note that any install_requires dependencies not yet present are also installed, as regular eggs (they are easy_install-ed). Those dependencies are not uninstalled when uninstalling the development egg.



来源:https://stackoverflow.com/questions/20339183/difference-between-setup-py-install-and-setup-py-develop

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