bex*_*xer 9 python restructuredtext pypi
当我将包上传到PyPI时,我想在我的README.rst文件中链接一个图像.在我的自述文件中我有:
.. image:: example-python.png
:height: 100px
:width: 200px
:scale: 100 %
:align: center
Run Code Online (Sandbox Code Playgroud)
在MANIFEST.in我有:
# Include the image file
include example-python.png
Run Code Online (Sandbox Code Playgroud)
现在它没有显示在testpypi中.然而,它在GitHub上显示得很好.难道我做错了什么?
在.. image:: example-python.png您使用相对 URL 时,即浏览器期望图像与包位于同一目录中。我怀疑是否可以在 PyPI 上上传图像。将其上传到某处并将 URL 更改为绝对 URL。我认为 Github 上已有的图像就可以了。
includeMANIFEST.in 中的指令不起作用,因为它将图像包含到源(sdist)存档中,浏览器永远不会在其中查找它。
| 归档时间: |
|
| 查看次数: |
721 次 |
| 最近记录: |