Skip to content

community/py3-gitlab: add missing dependency

Keith Maxwell requested to merge maxwell-k/aports:py3-gitlab into master

Before this change:

$ sudo apk add py3-gitlab

$ gitlab --version
Traceback (most recent call last):
  File "/usr/bin/gitlab", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

After this change:

$ sudo apk add py3-gitlab

$ gitlab --version
2.2.0

The command above were run inside docker-abuild using dabuild sh.

The change is required because /usr/bin/gitlab includes the line:

from pkg_resources import load_entry_point

That means that py3-setuptools is required at runtime:

$ python3 -c 'import pkg_resources; print(pkg_resources.__file__)'
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py
$ apk info -q -W /usr/lib/python3.8/site-packages/pkg_resources/__init__.py
py3-setuptools

Merge request reports