下载并执行: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 = ‘one@gmail.com’,
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