是否有始终指向最新版本的 PyPi 源下载链接? [英] Is there a PyPi source download link that always points to the lastest version?

查看:44
本文介绍了是否有始终指向最新版本的 PyPi 源下载链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我的最新版本的包在 PyPi 上,源代码可以通过这个 url 下载:

Say my latest version of a package is on PyPi and the source can be downloaded with this url:

https://pypi.python.org/packages/source/p/pydy/pydy-0.3.1.tar.gz

我真的很想要一个看起来像这样的网址:

I'd really like to have a url that looks like:

https://pypi.python.org/包/源/p/pydy/pydy-latest.tar.gz

将始终重定向到最新版本,在本例中为 0.3.1.这存在吗?

which will always redirect to the latest version, in this case 0.3.1. Does this exist?

推荐答案

不,pypi 不提供此类链接.版本可以有多个下载文件(不同 Python 版本的二进制文件、不同的分发格式等),并且可下载文件集可能因版本而异.

No, pypi provides no such links. Releases can have multiple download files (binaries for different Python versions, different distribution formats, etc), and that set of downloadable files can differ from version to version.

使用合适的安装程序工具(例如 pip)并让它为您查询 pypi,然后确定最新版本是什么以及该版本最好下载什么.

Use a decent installer tool (such as pip) and have it query pypi for you, then determine what is the latest version and what to best download for that version, instead.

例如,pip install -U 将为您安装最新版本,或者将已安装的版本升级到最新版本.

For example, pip install -U will install the latest version for you, or upgrade an already installed version to the latest.

对于项目页面,只需链接到没有版本的 PyPI 页面:

For a project page, just link to the PyPI page without a version:

https://pypi.python.org/pypi/pydy

和访问者显示当前可见的版本.除非另有说明,否则在您添加新版本时会自动隐藏旧版本.

and visitors are shown the currently visible release. Unless you state otherwise, old releases are automatically hidden when you add a new release.

这篇关于是否有始终指向最新版本的 PyPi 源下载链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆