Python Egg 文件有什么意义?
当我运行 python setup.py install django 时,它会生成一个 Egg 文件。
Python Egg 文件有什么用处?
When I run python setup.py install
django, it generates an egg file.
What is the usefulness of Python egg files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“egg”是Python 的二进制分发格式。它基本上是一个带有一些额外元数据的压缩文件,您可以将其提供给其他 Python 用户。他可以“安装”并使用它们。有关它们的详细信息,请参阅 http://peak.telecommunity.com/DevCenter/PythonEggs。
由于它是“本机”格式,Python 可以使用自定义导入器等。
有关如何使用它们的详细信息,请查看此。
我已经与包装世界脱节有一段时间了。有人讨论停止支持二进制分发格式。我所知道的相关文档位于 http://bitbucket。 org/tarek/distutils2/src/tip/docs/design/wiki.rst
The "egg" is Python's binary distribution format. It's basically a zipped file with some extra metadata that you can give another Python user. He can "install" and use them. For details on what they are, please refer to http://peak.telecommunity.com/DevCenter/PythonEggs.
Since it's a "native" format, Python can employ custom importers and the like.
For details on how to use them, check this out.
I've been out of touch with the packaging world for a while now. There was some talk of discontinuing support for binary distribution formats. The relevant documents that I know of are at http://bitbucket.org/tarek/distutils2/src/tip/docs/design/wiki.rst
Egg 文件是一个存档,其中包含一个模块(在您的例子中是 django),并让您能够
导入something_from_egg
。了解更多此处the egg file is an archive which holds a module (django in your case) and gives you the ability to
import something_from_egg
. Read more here