简体   繁体   English

Github在pypi上下载链接

[英]Github download link on pypi

I am trying to add a package to pypi but I don't want to upload a file containing the package. 我正在尝试将软件包添加到pypi但我不想上传包含该软件包的文件。 I'd rather use a download link pointing to Github. 我宁愿使用指向Github的下载链接。

I've done this with Bitbucket quite easily, but I can't seem to get the proper download link that works for Github. 我已经很轻松地使用Bitbucket完成了此操作,但似乎无法获得适用于Github的正确下载链接。 The pypi URL is mongokit-py3/0.9.0 , and clicking on the download link opens the *.tar.gz file. pypi URL是mongokit-py3 / 0.9.0 ,然后单击下载链接打开*.tar.gz文件。

However, pip doesn't see it and https://pypi.python.org/simple/mongokit-py3/ returns a blank list. 但是, pip看不到它,并且https://pypi.python.org/simple/mongokit-py3/返回一个空白列表。

What is wrong with the download URL I've given, or is this a bug in PyPi? 我提供的下载URL有什么问题,或者这是PyPi中的错误?

Goto the urls tab in your pypi account https://pypi.python.org/pypiame=PACKAGE_NAME&version=VERSION_NUMBER&:action=urls 转到您的pypi帐户中的“ 网址”标签https://pypi.python.org/pypiame=PACKAGE_NAME&version=VERSION_NUMBER&:action=urls

You'll see 3 options for Hosting mode 您会看到3种托管模式选项

  1. Do not extract URLs from the long description field - only use URLs explicitly specified below and files uploaded to PyPI (this is> preferred). 不要从长描述字段中提取URL-仅使用下面明确指定的URL和上传到PyPI的文件(这是首选)。
  2. Present URLs extracted from the long description field. 显示从详细描述字段中提取的URL。
  3. As above but also ask tools to scrape Homepage and Download URL (slow!) 如上所述,还要求工具抓取主页和下载URL(速度慢!)

Choose the 3rd option (by default the 1st one is selected) and it starts showing the link specified in the Download URL field on your /simple/PACKAGE_NAME page. 选择第三个选项(默认情况下,第一个选项被选中),它开始显示在/simple/PACKAGE_NAME页面上的Download URL字段中指定的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM