python 依赖 +部署工具?
有人知道Python中有一个处理模块依赖+部署的工具吗?
细节: 我所说的“句柄”是指:为
- 我列出、
- 跟踪并
- 捆绑一个 zip/可安装文件。
- 使在另一个系统上重新部署变得简单(即:在部署文件中包含正确版本的所有模块,并且不必去某个地方获取它们*)。
- 如果我要做一些改变环境的事情,就会提醒我。
- 它必须始终遵循模块依赖关系,而不仅仅是一层深度。
还有一些我可能没有想到的东西。
我不是在谈论 Virtualenv、Fabric、pip freeze** 和(我不认为)Paver。
今天晚上我尝试统计 Pylons 所依赖的模块。绕道了解 Snakefood 和 Graphviz 后,答案是很多。 100+(Snakefood 并没有全部得到)。
随着我越来越喜欢 Python,手动处理这个问题开始占用我比我想要的更多的时间,而且它不可靠。
如果重要的话,我在 Windows 7 上使用 Python 2.7。
* I know this will introduce some artifacts.
** Combining virtualenv and pip freeze goes some way to solving this, but it's still not what I am looking for.
Does anybody know of a tool to handle module dependencies + deployment in Python?
Details:
By handle, I mean:
- list,
- keep track of and
- bundle up a zip/installable file for me.
- Make it trivial to redeploy on another system (ie: includes all modules at the correct version in a deploy file, and does not have to go somewhere to get them *).
- Alerts me if I am about to do something which changes the environment.
- It must follow module dependencies all the way, not just one level deep.
Plus some stuff I probably haven't thought of.
I'm not talking about Virtualenv, Fabric, pip freeze** and (I don't think) Paver.
This evening I tried to count the modules that Pylons depends on. After a detour into Snakefood and Graphviz, the answer is A LOT. 100+ (and Snakefood did not get them all).
As I'm getting more and more into Python, handling this problem manually is starting to take up more of my time than I would like, and it's unreliable.
If it matters, I use Python 2.7 on Windows 7.
* I know this will introduce some artifacts.
** Combining virtualenv and pip freeze goes some way to solving this, but it's still not what I am looking for.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Setuptools 加上 pypi 是为此而制作的。 setuptools 是增强的 distutils,您可以使用它指定依赖项。例如,在 setup 函数中:
当您使用 easy_install 时,将引入该依赖项。
Setuptools plus pypi is made for that. The setuptools is an enhanced distutils, with which you can specify dependencies. For example, in the setup function:
Will pull in that dependency when you use easy_install.
由于您使用的是 Windows,请查看 py2exe。
py2exe FAQ 中有趣的内容:
Since you are on windows take a look at py2exe.
Something of interest from the py2exe FAQ: