1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 20:55:19 +03:00
aports/community/py3-gitlab/APKBUILD
Keith Maxwell e00ba8b6f4 community/py3-gitlab: add missing dependency
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 commands 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
2020-04-11 20:08:59 +00:00

35 lines
1.1 KiB
Text

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-gitlab
_pkgname=python-gitlab
pkgver=2.2.0
pkgrel=1
pkgdesc="v4 GitLab API compliant library and cmdline tool"
url="https://github.com/python-gitlab/python-gitlab"
arch="noarch"
license="LGPL-3.0-or-later"
depends="python3 py3-requests py3-six py3-setuptools"
checkdepends="py3-pytest py3-mock"
source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
python3 setup.py build
}
check() {
# Ignore tests that require unpackaged 'httmock'
python3 -m pytest \
--ignore gitlab/tests/test_gitlab.py \
--ignore gitlab/tests/test_mixins.py \
--ignore gitlab/tests/objects/test_application.py \
--ignore gitlab/tests/objects/test_commits.py \
--ignore gitlab/tests/objects/test_groups.py \
--ignore gitlab/tests/objects/test_projects.py
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="bdf34e4b9e45f5767faf81d52caf1b800d931a105940bb80b1e58cc8efc34a319196a6aa437d49215f0f4ff24359cc2497853486698a23413b2bb3dfe169e5e3 python-gitlab-2.2.0.tar.gz"