本文介绍了如何显示从vcs随pip安装的Python软件包的vcs修订版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像这样从vcs用pip安装一些软件包后
pip install git+https://github.com/kennethreitz/requests.git@355b97165c#requests
如何显示用于安装的vcs版本/提交/分支/标记(在此示例中为355b97165c)?

After installing some package with pip from vcs like this
pip install git+https://github.com/kennethreitz/requests.git@355b97165c#requests
how can I display the vcs revision/commit/branch/tag (355b97165c in this example) used to install it?

推荐答案

当前无法执行此操作,因为安装过程中使用的url不会记录在任何地方.但是,添加此类功能的工作正在进行中.参见持续功能/记录下载信息拉取请求.

There's currently no way to do this because url used during installation is not being recorded anywhere. However there's work in progress to add such functionality. See Continuing Feature/record download info pull request.

我要感谢#pip IRC频道的dstufft回答了我的问题,并指出了这个拉取请求(基于他的拉取请求).

I'd like to thank dstufft from #pip IRC channel for answering my question and pointing me to this pull request (which builds upon his pull request).

这篇关于如何显示从vcs随pip安装的Python软件包的vcs修订版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 04:33