What are the advantages of packaging your python library/application as an .egg file?

前端 未结 6 727
长发绾君心
长发绾君心 2021-01-07 17:29

I\'ve read some about .egg files and I\'ve noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer?

6条回答
  •  被撕碎了的回忆
    2021-01-07 17:50

    One egg by itself is not better than a proper source release. The good part is the dependency handling. Like debian or rpm packages, you can say you depend on other eggs and they'll be installed automatically (through pypi.python.org).

    A second comment: the egg format itself is a binary packaged format. Normal python packages that consist of just python code are best distributed as "source releases", so "python setup.py sdist" which result in a .tar.gz. These are also commonly called "eggs" when uploaded to pypi.

    Where you need binary eggs: when you're bundling some C code extension. You'll need several binary eggs (a 32bit unix one, a windows one, etc.) then.

提交回复
热议问题