美文网首页
Python 包发布

Python 包发布

作者: Anoyi | 来源:发表于2019-08-21 11:02 被阅读0次

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/*

相关文章

网友评论

      本文标题:Python 包发布

      本文链接:https://www.haomeiwen.com/subject/bdcbsctx.html