代码拉取完成,页面将自动刷新
刚发布到了 pypi 测试平台:https://test.pypi.org/project/test-yiqi/
刚试过本地安装:
$ python3 -m pip install --index-url https://test.pypi.org/simple/ test-yiqi
可以在 python3 下如此使用:
>>> from 易起.编码 import *
>>> 编码_UTF8编码("测试")
b'\xe6\xb5\x8b\xe8\xaf\x95'
下面是简要发布过程,仅选取了“编码”部分进行打包演示。
完整源码结构在:https://gitee.com/zhishi/pypi-release-easy-demo 。包结构暂用 易起/编码
,请酌情修改。setup.py 中的各项内容和 README.md 都需填充。
打包:
$ python3 setup.py sdist bdist_wheel
$ python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/test-yiqi-0.0.1*
Uploading distributions to https://test.pypi.org/legacy/
Enter your username: xuanwu
Enter your password:
Uploading test-yiqi-0.0.1.tar.gz
100%|████████████████████████████████████████████████████████| 4.56k/4.56k [00:01<00:00, 2.61kB/s]
View at:
https://test.pypi.org/project/test-yiqi/0.0.1/
即可访问 pypi 测试页面查看。
在 pypi 正式平台发布过程也类似(下面“猜数字”就是),没记错的话需要在 pypi 再注册一个账号。
有问题请告知。
参考: