Serve a specific version of a requirement, otherwise default to PyPi

335 Views Asked by At

We are successfully running a relaying devpi server, serving our private libraries. The server is able to serve the libraries that we upload, and relay the rest to the standard PyPi.

Recently, we have been forced to customize a third-party library, and we are serving our customized version with in our devpi server. 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.

How can I configure devpi to serve our libraries/versions, and relay everything else to PyPi?

1

There are 1 best solutions below

0
On

You need to add the PyPi package name to the index package pypi_whitelist. Just make sure that you are using a different version number of your package then what is available on 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

Another solution would be to use a different name for you local package.