Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py 增加 long_description, 用来在 pypi 仓库显示 readme #113

Closed
itaa opened this issue Sep 5, 2018 · 0 comments
Closed

setup.py 增加 long_description, 用来在 pypi 仓库显示 readme #113

itaa opened this issue Sep 5, 2018 · 0 comments
Milestone

Comments

@itaa
Copy link
Contributor

itaa commented Sep 5, 2018

setup.py 增加 long_description, 用来在 pypi 仓库显示 readme

目前 fishbase 在 pypi 仓库上的 Project description 是空的,通过在 setup 中加入 long_description 参数,可以添加 Project description。具体方法如下:

  • 将 README.md 转换为 README.rst ,文件名和内容均需修改
  • 在 setup.py 中加入以下代码:
# 文件开头读取 README.rst 
with io.open('README.rst', 'rt', encoding='utf8') as f:
    readme = f.read()
.
.
.
   # setup 中  新增 long_description 字段
    long_description=readme, 
.
.
.
@itaa itaa added this to the v1.1.1 milestone Sep 5, 2018
@itaa itaa closed this as completed Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant