python学习如何发布包/day12下午
新建distrust目录,目录下新建setup.py,test1.py和test2.py文件
Setup.py下内容为:
from distutils.core import setup #导入发布包,distutils发布利用
setup(
name="xigua",
version="1.1.6",
description="中国人民银行软件管理系统",
author="王者飞",
author_email="[email protected]",
py_modules=["test1","test2"], #发布test1,和test2模块
)
test1.py内容如下:
def haha(): print("哈哈")
test2.py内容如下:
def heiheihei(): print("嘿嘿嘿嘿")
然后就可以引用了