【发布时间】:2016-05-26 15:23:46
【问题描述】:
我对用于打包此模块的 README.rst 文件有疑问。我查了很多 SO 的帖子,但没有发现任何帮助。
目前,我正在使用一个非常简单的自述文件进行测试
pytelemetry
===========
pytelemetry enables remote monitoring and control of embedded
devices. Specifically, pytelemetry implements a custom communication
protocol, based on the PubSub messaging pattern.
这里是 setup.py 文件的概述
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README0.rst'), encoding='utf-8') as f:
long_description = f.read()
print(long_description) # Prints the correct readme
setup(
name='pytelemetry',
version='1.1.0',
description='Lightweight remote monitoring and control of embedded devices',
long_description=long_description, # Not working !
我使用python setup.py bdist_wheel 构建包。使用 python 3.5.1,车轮 0.24.0 和 0.29.0。
print(long_description) 工作得非常好,但是当我解压缩生成的轮子时,DESCRIPTION.rst 文件(我认为应该包含长描述)只包含:
pytelemetry
这对应于我的 README.rst 的第一行。在 pypi 上,我得到相同的输出。为什么我最后只有自述文件的第一行?
- 我认为 DESCRIPTION.rst 包含 long_description 中 setup.py 的任何内容是否正确?
- 我该如何解决这个问题?
- 以后如何调试此类问题?
【问题讨论】:
标签: python python-3.x pypi python-wheel