发布计划

1、准备发布

  • 创建模块文件夹,例如:

    创建文件夹 Test ,把需要发布模块文件 test.py 放入当前新建的目录下

  • 创建名为 setup.py的文件

    from distutils.core import setup
    setup(
      name = 'nester',
      version = '1.0.0',
      py_modules = ['nester'],
      author = 'zh',
      author_email = '[email protected]',
      url = 'http://www.zh.com',
      description = 'a demo',
    )
    

2、构建发布

  • 在当前文件夹打开终端窗口,运行命令: python setup.py sdist

  • 发布安装本地副本,运行命令: python setup.py install

3、导入模块并使用

  • import test
email:[email protected] all right reserved,powered by GitbookFile Modify: 2018-12-03 03:21:50

results matching ""

    No results matching ""