Pypi forwarding not working
Summary
We have a self-hosted premium installation of Gitlab with PyPi forwarding configured. However when trying to install packages from a Mac OS using Gitlab PyPi index installation fails.
Steps to reproduce
From a mac do:
pip install -vvvv --index-url {your gitlab pypi index with fwd} aiohttp
You'd see the following error
ERROR: Could not find a version that satisfies the requirement aiohttp==3.7.4.post0 (from versions: none)
ERROR: No matching distribution found for aiohttp==3.7.4.post0
What is the current bug behavior?
Package do not install when running pip in a Mac and using Gitlab's PyPi forwarding. Even when --no-binary :all: is specified.
What is the expected correct behavior?
Gitlab PyPi should look and request wheels for MacOS.
Relevant logs and/or screenshots
Using pip 21.2.4 from /Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip (python 3.8)
Non-user install because user site-packages disabled
Created temporary directory: /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-ephem-wheel-cache-2u3slqrt
Created temporary directory: /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-req-tracker-q167xn2f
Initialized build tracking at /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-req-tracker-q167xn2f
Created build tracker: /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-req-tracker-q167xn2f
Entered build tracker: /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-req-tracker-q167xn2f
Created temporary directory: /private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-install-tm5ez6c8
Looking in indexes: https://__token__:****@gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple
1 location(s) to search for versions of aiohttp:
* https://__token__:****@gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/
Fetching project page and analyzing links: https://__token__:****@gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/
Getting page https://__token__:****@gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/
Found credentials in url for gitlab.ourcompany.com
Looking up "https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): gitlab.ourcompany.com:443
https://gitlab.ourcompany.com:443 "GET /api/v4/projects/611/packages/pypi/simple/aiohttp/ HTTP/1.1" 304 0
Skipping link: none of the wheel's tags (cp38-cp38-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/d03abec50df423b026a5aa09656bd9d37f1e6a49271f123f31f9b8aed5dc3ea3/aiohttp-3.7.3-cp38-cp38-manylinux2014_x86_64.whl#sha256=d03abec50df423b026a5aa09656bd9d37f1e6a49271f123f31f9b8aed5dc3ea3 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp39-cp39-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/cc31e906be1cc121ee201adbdf844522ea3349600dd0a40366611ca18cd40e81/aiohttp-3.7.4-cp39-cp39-manylinux2014_x86_64.whl#sha256=cc31e906be1cc121ee201adbdf844522ea3349600dd0a40366611ca18cd40e81 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp37-cp37m-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/f4496d8d04da2e98cc9133e238ccebf6a13ef39a93da2e87146c8c8ac9768242/aiohttp-3.7.4-cp37-cp37m-manylinux2014_x86_64.whl#sha256=f4496d8d04da2e98cc9133e238ccebf6a13ef39a93da2e87146c8c8ac9768242 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp38-cp38-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/418597633b5cd9639e514b1d748f358832c08cd5d9ef0870026535bd5eaefdd0/aiohttp-3.7.4-cp38-cp38-manylinux2014_x86_64.whl#sha256=418597633b5cd9639e514b1d748f358832c08cd5d9ef0870026535bd5eaefdd0 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp38-cp38-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/79ebfc238612123a713a457d92afb4096e2148be17df6c50fb9bf7a81c2f8013/aiohttp-3.7.4.post0-cp38-cp38-manylinux2014_x86_64.whl#sha256=79ebfc238612123a713a457d92afb4096e2148be17df6c50fb9bf7a81c2f8013 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp37-cp37m-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/14762875b22d0055f05d12abc7f7d61d5fd4fe4642ce1a249abdf8c700bf1fd8/aiohttp-3.7.4.post0-cp37-cp37m-manylinux2014_x86_64.whl#sha256=14762875b22d0055f05d12abc7f7d61d5fd4fe4642ce1a249abdf8c700bf1fd8 (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: none of the wheel's tags (cp39-cp39-manylinux2014_x86_64) are compatible (run pip debug --verbose to show compatible tags): https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/files/17c073de315745a1510393a96e680d20af8e67e324f70b42accbd4cb3315c9fb/aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl#sha256=17c073de315745a1510393a96e680d20af8e67e324f70b42accbd4cb3315c9fb (from https://gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/) (requires-python:>=3.6)
Skipping link: not a file: https://__token__:****@gitlab.ourcompany.com/api/v4/projects/611/packages/pypi/simple/aiohttp/
Given no hashes to check 0 links for project 'aiohttp': discarding no candidates
Exception information:
Traceback (most recent call last):
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('aiohttp')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 343, in resolve
raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('aiohttp'), parent=None)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 315, in run
requirement_set = resolver.resolve(
File "/Users/my.user/myproject/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 103, in resolve
raise error from e
pip._internal.exceptions.DistributionNotFound: No matching distribution found for aiohttp
Removed build tracker: '/private/var/folders/cq/7k6zdwk13fz9hz885kdd9zqw0000gp/T/pip-req-tracker-q167xn2f'
Upon further inspection by going locally to our PyPi package registry in Gitlab, I see that only the following files are available:
aiohttp-3.7.3-cp38-cp38-manylinux2014_x86_64.whl
aiohttp-3.7.4-cp39-cp39-manylinux2014_x86_64.whl
aiohttp-3.7.4-cp37-cp37m-manylinux2014_x86_64.whl
aiohttp-3.7.4-cp38-cp38-manylinux2014_x86_64.whl
aiohttp-3.7.4.post0-cp38-cp38-manylinux2014_x86_64.whl
aiohttp-3.7.4.post0-cp37-cp37m-manylinux2014_x86_64.whl
aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl
(No wheels or source for MacOS in our PyPi index)
Edited by 🤖 GitLab Bot 🤖