6

正确地上传至 PyPI 并展示文档

 3 years ago
source link: https://blog.lilydjwg.me/2018/11/19/upload-to-pypi-with-correctly-rendered-documentation.213784.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

正确地上传至 PyPI 并展示文档

本文来自依云's Blog,转载请注明。

数年过去了,今天经过多次尝试和询问,我终于成功让 nvchecker 的文档以富文件的形式展示在 PyPI 上了!

正确地打包上传命令是这样的:

rm -rf dist && python setup.py sdist && twine check dist/* && twine upload -s dist/*

如果 twine check 不通过,那么修正后重新执行。如果文档包含错误,PyPI 会以纯文本形式展示。

  • 听说要设置 long_description_content_type。好像 Markdown 才要设置的,rst 不用。
  • 听说不支持 # 开头的链接。实际上现在已经支持了。
  • 听说要用 twine,那就用吧。

原来我之前的文档一直没有正确地渲染,是因为有一个标题的「-」少了两个……

关于 PyPI 的资料是挺多的,但是细节不够详细,陈旧信息很多,唉。

发送到 Kindle

Category: python | Tags: python | Read Count: 86380

评论 (2)
Arch 说:
3 年前

依云,在Linxu使用gRaner作为文件管理器,其中自带图像预览,但是我用的是Termite终端默认不支持(官方原生支持urxvt和xterm等https://github.com/ranger/ranger/wiki/Image-Previews)。
于是我按照文档采用mpv作为默认的图片预览https://github.com/ranger/ranger/wiki/Image-Previews#with-mpv。
但是问题来了,按照官方配置在ranger内嵌预览时Mpv会抛出错误。错误log如下:https://gist.github.com/imaojun/a2f4dd1e51953a3948979209f99d79ec
。我看依云用的是xfce终端,如果依云也用ranger的话默认也是不能图片预览的吧。不知道依云大大是如何解决的?如果依云不用ranger的话就忽略这个问题好啦。

依云 说:
3 年前

以前我的 ranger 是能预览图片的,后来就莫名其妙地不能了,我也不明白原因。不过我基本上不用图片预览功能,用 sxiv 和 geeqie 处理图片了。需要预览图片的时候就用 thunar。

[取消回复评论]

昵称 登录 E-mail: *
Web:
Twitter:
当有新评论通过 E-mail 通知我

loading captcha image...
(输入验证码)

or Ctrl+Enter


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK