How to provide alternative urls for dependencies in pyproject.toml

18 Views Asked by At

Can you list multiple urls for pip to try to find a package at in pyproject.toml (or "legacy" configuration files like setup.py)?

I'm thinking something like:

[project]
name='my_project'
dependencies = [
   'library_package@{git+https://path_to_git_repo OR git+https://path_to_alternative_git_repo}'
]

The reason I'd find this useful is that I need my package to work in two different isolated corporate networks which have their own git bitbucket server, with a different url. It would be nice if I could maintain a single version of my package's pyproject.toml that can pull its dependencies correctly from either network's git repository.

0

There are 0 best solutions below