I'm using Artifactory to host a large number of python modules. A couple of times, a new python module on https://pypi.python.org/pypi will be uploaded with the same name. This causes problems when someone tries to install one of my modules from Artifactory using pip. By default, pip looks for public packages first.
Here's what I've tried:
1. I've tried modifying my .pypirc file accordingly,
[distutils] index-servers= artifactory pypi
with appropriate entries for the two index servers, but I'm fairly certain that pip is ignoring this information.
2. I've tried manually specifying which index server to use.
I can specify --index-url
or --extra-index-url
but the latter does not help when the public package has a higher version number than my private package. If I specify the former, then public dependencies can't be found! It's like I can't win.
3. I've tried specifying dependency_links
in setup.py.
... but this is deprecated as per this answer: pip ignores dependency_links in setup.py
How do I configure pip to prefer my Artifactory repository over the public one?