设置工具安装命令的差异

以下命令之间有什么区别

python setup.py install develop

对我不起作用错误没有这样的文件或目录:’build / bdist.macosx-10.7-intel / egg / test-easy-install-37886.pth’

python setup.py develop

对我有用,似乎制作了.egg链接文件

python setup.py install

对我而言有效,似乎制作了.zip文件格式的.egg文件

解决方法:

Develop is a setuptools / distribute feature that allows you to add a project
to your Python environment without installing it – so you can continue
its “development”

In other words, when you call “python setup.py develop”, setuptools will
compile the metadata and hook your project into Python’s site-package,
but the packages and modules that will be used are the one in the
directory where you’ve run that command.

This is useful to continue working on your code and testing it without
having to run “python setup.py install” on every run

在开发过程中,Python通过运行setup.py脚本而不是install来“伪装”软件包.区别在于对环境的修改(与developerWorks无关),因此可以从其当前位置而不是从站点软件包目录中导入软件包.这样做的好处是您可以开发其他程序包正在使用的程序包,并且可以使用developerWorks修改源代码.

至于“ setup.py install development”,对不起,我从未见过有人使用过.

source

source

source

上一篇:如何使easy_install在setup.py中执行自定义命令?


下一篇:python-使用setuptools包括Bash自动补全