-
到官网注册用户:https://pypi.org/
邮箱:562282219@qq.com 用户名:ALISURE 密码:3/4
-
验证邮箱
-
setup.py
:demo/setup.py, -
README.rst
:该内容是显示在pypi包首页上。
-
具体内容见demo
-
打包
- 源代码的包:在当前目录的dist文件夹下,就会多出一个以tar.gz结尾的包。
python setup.py sdist build
- 或者wheels格式的包:在dist文件夹下生成一个whl文件
python setup.py bdist_wheel --universal
-
上传
- 上传source包
python setup.py sdist upload
- 上传pre-compiled包
python setup.py bdist_wheel upload
- 或者使用twine上传,需要先安装
sudo pip install twine
twine upload dist/*
可以在任何地方安装:
```
sudo pip install pyalisuredemo
```
可以在任何地方更新:
```
sudo pip install pyalisuredemo --upgrade
```
import pyalisuredemo as alisuredemo
alisuredemo.pyhton11()
alisuredemo.pyhton22()
alisuredemo.pyhton11("aaaaa")
alisuredemo.pyhton22("bbbbb")
-
Upload failed (403)
问题:
Upload failed (403): Invalid or non-existent authentication information. error: Upload failed (403): Invalid or non-existent authentication information.
解决方法:创建
~/.pypirc
文件[distutils] index-servers=pypi [pypi] repository = https://upload.pypi.org/legacy/ username = <username> password = <password>