We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
Python 使用 distutils 和 setuptools 进行依赖和打包。
这是一个解释基础知识的教程: http://docs.activestate.com/ activepython/3.2/diveintopython3/html/packaging.html
简而言之,您将拥有 setup.py 文件,其中包含依赖项和脚本编译/安装信息,您可以使用以下命令构建 Egg、dist tarball、二进制 tarball 等它。
Python uses distutils and setuptools for dependency and packaging.
Heres a tutorial which explains basics: http://docs.activestate.com/activepython/3.2/diveintopython3/html/packaging.html
In short, you will have setup.py file, which has dependency and script compilation/installation information, and you can build eggs, dist tarballs, binary tarballs, etc with it.
没有直接匹配。但是,您可以获得的最接近的:
其他产品是 Maven/zc.buildout 的子集:
您可能了解 Ant 和 shell 脚本,因此您还可以检查这些 Python 工具:
There is no direct match. However, the closest you can get:
Other offerings are subsets of Maven/zc.buildout:
You probably know Ant and shell scripting, so you could check also these Python tools:
我想指出 PyBuilder 它深受 maven 启发,但使用 python 而不是 XML 进行配置,因此它实际上是可读的,恕我直言。
有一个用于依赖关系管理的插件(在底层使用 pip 并区分构建和运行时依赖关系),并且与 Maven 不同,您可以使用单个命令运行完整的构建生命周期。
I'd like to point out PyBuilder which is heavily inspired by maven but uses python instead of XML for configuration, so it's actually readable, IMHO.
There is a plugin for dependency management (uses pip under the hood and differentiates between build and runtime dependencies) and, not unlike maven, you can run through the full build lifecycle with a single command.
对于部署,除了 distutils/setuptoos 之外,还可以查看 pip 包(使用下面的 setuptools)。它可以回滚失败的安装并卸载(easy_install/setuptools 中缺少的东西)。此外,您可以通过需求文本文件指定依赖关系。
For deployment, in addition to distutils/setuptoos, also take a look at the pip package (uses setuptools underneath). It can rollback failed installations and also uninstall (something missing from easy_install/setuptools). In addition, you can specify dependencies through a requirements text file.
最好使用 virtualenv 创建独立的项目环境并使用 pip/easy_install 来管理依赖项。
It's good to use virtualenv to create standalone project environment and use pip/easy_install to management dependencies.