环境准备:
ubuntu14.xx
python2.7(只实测了这个版本)
setuptools(egg包是需要)(sudo apt-get install python-setuptools)
Package的制作与安装过程
1. 编写module.py程序
# -*- coding: utf-8 -*-
# Author : ***
# Date: ***
# Email: ***
class module(object):
pass
# 省略一万字
2. 编写模块
mypkg/ __init__.py module.py data/ tables.dat spoons.dat forks.dat
3. 写setup.py文件
setup.py中各个参数的含义请参考python官网Writing the Setup Script
from setuptools import setup setup(..., packages