[记]pypi打包上传
提示:Upload failed (403): Invalid or non-existent authentication information 参考解决方法
环境 python 3.8.10
第一步:编写setup.py文件用于打包:
setup.py文件编写参考:
# coding: utf-8 from distutils.core import setup setup(name='elasticdb', #打包后的包文件名 version='1.0', description='elasticsearch backpack', #说明 author='liu.xxxxx', author_email='liu.xxxxxx@xxxxxxxxx', url='YEYE', py_modules=['elasticdb.es_check','elasticdb.es_config','elasticdb.es_log','elasticdb.es_sysdb'], #你要打包的文件 )
第二步:python setup.py build 验证包正确性
第三步:python setup.py sdist 生成包
位于dist目录下