简体   繁体   English

在requirements.txt中指定大于或等于Git标记

[英]Specify greater than or equal to Git tag in requirements.txt

In my requirements.txt I'd like to specify that I need greater than or equal to a specific version of a Python dependency. 在我的requirements.txt中,我想指定我需要大于或等于特定版本的Python依赖项。 I could do this if I wanted the dependency Python package installed from PyPI: 如果我想从PyPI安装依赖Python包,我可以这样做:

ExamplePackage>=0.2

But what if I want to specify the GitHub URL to install from? 但是,如果我想指定要安装的GitHub URL呢? I know you can specify an exact tag: 我知道你可以指定一个确切的标签:

-e git://github.com/my-username/ExamplePackage.git@v0.2

But can I specify a >= instead? 但我可以指定一个> =而不是吗?

Not possible, unfortunately. 不幸的是,不可能。

See the list of supported git specifications in the official doc s, none of which allow for >= 请参阅官方文档中支持的git规范列表,其中没有一个允许> =

Seems like it would be useful functionality for somebody to add, though 看起来这对于某人来说是有用的功能

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

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