blueFast
blueFast

Reputation: 44491

Configure list of servers for devpi

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:

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.

Upvotes: 3

Views: 1286

Answers (1)

Matthias Bach
Matthias Bach

Reputation: 61

You can do this by combining Devpi's index mirroring and the index inheritance feature.

Assuming you have a user bob on your Devpi server,

  1. create an index mirroring your private server: devpi index -c private type=mirror mirror_url=http://xx.xx.xx.xx:yyyyy/simple/.
  2. Create an index inheriting from /root/pypi and the newly created mirror: devpi index -c all bases=/bob/all,/root/pypi

Afterwards you should be able to get all packages from /bob/all.

Upvotes: 2

Related Questions