简体   繁体   中英

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

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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