[英]Serve a specific version of a requirement, otherwise default to PyPi
We are successfully running a relaying devpi
server, serving our private libraries. 我们正在成功运行中继
devpi
服务器,为我们的私有库提供服务。 The server is able to serve the libraries that we upload, and relay the rest to the standard PyPi
. 服务器能够提供我们上载的库,并将其余库中继到标准
PyPi
。
Recently, we have been forced to customize a third-party library , and we are serving our customized version with in our devpi
server. 最近,我们被迫定制第三方库 ,并且我们在
devpi
服务器中提供定制版本。 This is working fine. 一切正常。 But I have just realized that other versions of this library, which are not hosted in our
devpi
, but in the standard PyPi
, are not being served. 但是我刚刚意识到,该库的其他版本(不是在我们的
devpi
托管,而是在标准PyPi
中)没有提供。
How can I configure devpi
to serve our libraries/versions, and relay everything else to PyPi
? 如何配置
devpi
来服务我们的库/版本,并将其他所有内容中继到PyPi
?
You need to add the PyPi
package name to the index package pypi_whitelist
. 您需要将
PyPi
包名称添加到索引包pypi_whitelist
。 Just make sure that you are using a different version number of your package then what is available on PyPi
. 只要确保您使用的软件包版本号与
PyPi
上可用的版本号不同PyPi
。 Here is the description on how index whitelists work: http://doc.devpi.net/latest/userman/devpi_indices.html?highlight=whitelist#modifying-the-mirror-whitelist 这是有关索引白名单如何工作的描述: http : //doc.devpi.net/latest/userman/devpi_indices.html? highlight=whitelist#modifying-the-mirror-whitelist
Another solution would be to use a different name for you local package. 另一种解决方案是为您的本地软件包使用其他名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.