3

I am running a devpi-server locally in my laptop, so that I can work offline whenever I have no internet connection (this only works if devpi has had the chance to locally cache the packages that I need, of course)

Currently I have the devpi-server configured with default settings, so that it is looking for packages in the standard PyPi.

I would like to configure the devpi-server to use a list of servers to find packages:

  • a private PyPi server, where we are publishing our internal libraries: http://xx.xx.xx.xx:yyyyy/simple/
  • the standard PyPi servers, for the usual Python ecosystem: https://www.python.org/pypi

Question: is it possible to configure devpi with a list of servers to try?

I do not find this option in the devpi documentation.

Packages should be search in the list of servers: if a package is not found in the first server, it should look for it in the second, until the end of the list is reached and a "not found" message is replied.

4

1 回答 1

2

您可以通过结合 Devpi 的索引镜像和索引继承功能来做到这一点。

假设你bob的 Devpi 服务器上有一个用户,

  1. 创建一个镜像您的私人服务器的索引:devpi index -c private type=mirror mirror_url=http://xx.xx.xx.xx:yyyyy/simple/.
  2. 创建一个继承自/root/pypi和新创建的镜像的索引:devpi index -c all bases=/bob/all,/root/pypi

之后,您应该能够从/bob/all.

于 2017-12-04T19:25:55.247 回答