Skip to content

Commit bb794bb

Browse files
authored
Merge pull request #106 from nedbat/patch-1
Add a "Documentation" link to the sidebar on PyPI
2 parents aa834d0 + c558a85 commit bb794bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
long_description = re.sub(r'!\['+ext+'\]\((.*)\)', '!['+ext+']('+'https://raw.githubusercontent.com/{}/{}'.format(cfg['user'],cfg['lib_name'])+'/'+cfg['branch']+'/\\1)', long_description)
3838
long_description = re.sub(r'src=\"(.*)\.'+ext+'\"', 'src=\"https://raw.githubusercontent.com/{}/{}'.format(cfg['user'],cfg['lib_name'])+'/'+cfg['branch']+'/\\1.'+ext+'\"', long_description)
3939

40+
project_urls = {}
41+
if cfg.get('doc_host'): project_urls["Documentation"] = cfg['doc_host'] + cfg.get('doc_baseurl', '')
42+
4043
setuptools.setup(
4144
name = 'ghapi',
4245
license = lic[0],
@@ -56,5 +59,6 @@
5659
long_description_content_type = 'text/markdown',
5760
zip_safe = False,
5861
entry_points = { 'console_scripts': cfg.get('console_scripts','').split() },
62+
project_urls = project_urls,
5963
**setup_cfg)
6064

0 commit comments

Comments
 (0)