python 发布

# -*- coding: utf-8 -*-

from setuptools import setup
from setuptools import find_packages

setup(
    name='package name',
    version='0.0.1',
    description='short description',
    author='author name',
    author_email='email',
    platforms=['macOS', 'Windows', 'Linux'],
    url='url',
    packages=find_packages(),
    install_requires=['numpy', 'dill'] # pip 安装时的依赖
)

  1. pip install wheel 安装 wheel 模块
  2. python setup.py bdist_wheel 打包生成如下目录(build, dist, **.egg)
  3. whl 文件在 dist 中, 使用 pip 安装即可
原文地址:https://www.cnblogs.com/megachen/p/9742228.html