模块发布
来源:互联网 发布:吸血女伯爵 知乎 编辑:程序博客网 时间:2024/06/05 08:01
模块发布
1.mymodule目录结构体如下:
├── setup.py├── suba│ ├── aa.py│ ├── bb.py│ └── __init__.py└── subb ├── cc.py ├── dd.py └── __init__.py
2.编辑setup.py文件
py_modules需指明所需包含的py文件
from distutils.core import setupsetup(name="dongGe", version="1.0", description="dongGe's module", author="dongGe", py_modules=['suba.aa', 'suba.bb', 'subb.cc', 'subb.dd'])
3.构建模块
python setup.py build
构建后目录结构
├── build│ └── lib.linux-i686-2.7│ ├── suba│ │ ├── aa.py│ │ ├── bb.py│ │ └── __init__.py│ └── subb│ ├── cc.py│ ├── dd.py│ └── __init__.py├── setup.py├── suba│ ├── aa.py│ ├── bb.py│ └── __init__.py└── subb ├── cc.py ├── dd.py └── __init__.py
4.生成发布压缩包
python setup.py sdist
打包后,生成最终发布压缩包dongGe-1.0.tar.gz , 目录结构
├── build│ └── lib.linux-i686-2.7│ ├── suba│ │ ├── aa.py│ │ ├── bb.py│ │ └── __init__.py│ └── subb│ ├── cc.py│ ├── dd.py│ └── __init__.py├── dist│ └── dongGe-1.0.tar.gz├── MANIFEST├── setup.py├── suba│ ├── aa.py│ ├── bb.py│ └── __init__.py└── subb ├── cc.py ├── dd.py └── __init__.py
阅读全文
0 0
- 模块发布
- Hibernate动态模块发布
- 如何发布node 模块
- py发布模块
- python模块的发布
- npm发布模块
- 发布python代码模块
- 使用distutils发布模块
- ecshop 呼叫中心模块发布
- Google发布Apache加速模块
- Python模块步骤发布小结
- ShareSDK发布评论、赞模块
- windows下发布Python模块
- opencv3.1发布模块介绍
- 发布你的Python模块
- node模块发布到npm
- NodeJS模块开发与发布
- Jekyll发布文章+评论模块
- img绝对路径相对路径练习练习
- Java Web 的No result defined for action cn.itcast.action.CustomerAction and result input 错误
- leetcode: 17. Letter Combinations of a Phone Number
- 从H264到RTP
- 热点地图5边行计算练习
- 模块发布
- [leetcode]651. 4 Keys Keyboard
- 概念 : 分布式 集群
- 枚举的学习之路二
- 欢迎使用CSDN-markdown编辑器
- Linux中fstab和mtab
- 发布 Library 到 JitPack
- tensorflow(2)-优化函数
- linux防火墙设置与重启网卡