0
votes

My Azure DevOps project uses a private PyPI index to store and publish python packages. I saw in the documentation that the public PyPI can be linked as an upstream source of this feed:

When you enable an upstream source, packages installed from the upstream source via the feed will automatically be saved in the feed.

I take this to mean that when I try to install a package that doesn't exist in my feed, e.g.

pip install scrapy -i https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feed}%40Local/pypi/simple/

...then it should see that Scrapy is not in the feed and go get it from PyPI. Instead, I get the following error:

ERROR: Could not find a version that satisfies the requirement scrapy (from versions: none)
ERROR: No matching distribution found for scrapy

Am I doing something wrong or is DevOps not behaving as promised?

1

1 Answers

0
votes

The problem is that you are including the @Localview tag in your URL. When installing from the local view, you are restricted to packages that are already there. If you remove all view tags from your index-url, the upstream source behavior will work as expected.

i.e.

pip install scrapy -i https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feed}/pypi/simple/