Python 包发布

1、注册 Pipy 账号

https://pypi.org/account/register/

2、安装 twine

pip install twine

3、在 python 工程下添加 setup.py

示例:

from setuptools import setup

setup(
    name='python-grpc',
    version='0.0.1',
    description='common grpc service',
    author='Anoyi',
    author_email='545544032@qq.com',
    url='https://github.com/ChinaSilence/python-grpc',
    py_modules=['grpclib', 'service_pb2', 'service_pb2_grpc'],
    install_requires=['grpcio>=1.23.0']
)

4、打包 python 工程

python setup.py sdist 

5、发布 python 工程到 Pipy

twine upload dist/*
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容