将setup.py和其他文件放在一个目录下,进入目录 执行python setup.py sdist 命令
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-04-18 16:38:40 # @Author : blackstone (971406187@qq.com) # @Do : from distutils.core import setup #print dir(setup) setup( name= 'Test', version= '1.0.0', #关联模块 py_modules =['Test'], author= 'blackstone', author_email='97146187@qq.com', url='1', description= '发布模块测试' )