下載並執行:ez_setup.py,或者,直接下載安裝easy_install
egg文件:哈哈,各位直接用easy_install xxx.egg來孵蛋吧
如果想要制作egg文件,需要在要打包的文件夾下編輯setup.py文件,example.py
from setuptools import setup, find_packages
setup(
name = 'eggtest',
version = '0.1',
packages = find_packages(),
description = 'egg demo',
long_description = 'egg demo description',
author = 'one',
author_email = '[email protected]',
license = 'BSD',
keywords = ('test', 'egg'),
platforms = 'independant',
url = 'http://xxxxxx.xxx.xxx'
)
執行python setup.py bdist_egg,當前目錄下dist目錄下會生成egg文件。
其他文件格式:
python setup.py build #編譯
python setup.py sdist #zip
python setup.py bdist_wininst # exe
python setup.py bdist_rpm # rpm