backports/py3-gitlab: backported from edge/testing

This commit is contained in:
build@apk-groulx 2023-02-03 08:17:28 +00:00
parent 9b43f1ac3c
commit 14f32da4e4

View file

@ -0,0 +1,49 @@
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=py3-gitlab
_pyname=${pkgname/py3/python}
pkgver=3.12.0
pkgrel=1
pkgdesc="Python wrapper for Gitlab's API"
url="https://github.com/python-gitlab/python-gitlab"
arch="noarch"
license="LGPL-3.0-or-later"
depends="python3 py3-requests py3-requests-toolbelt"
makedepends="
py3-setuptools
py3-gpep517
py3-installer
py3-wheel
py3-sphinx
py3-sphinxcontrib-autoprogram
py3-myst-parser
"
checkdepends="py3-pytest py3-responses"
option="!check"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-gitlab/python-gitlab/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
sphinx-build -W -b man docs/ man/
}
check() {
sed -i "s|/usr/bin/false|/bin/false|g" tests/unit/test_config.py
python3 -m venv --system-site-packages testenv
testenv/bin/python3 -m installer dist/*.whl
testenv/bin/python3 -m pytest --ignore=tests/functional/
}
package() {
python3 -m installer -d "$pkgdir" \
dist/*.whl
install -Dm644 man/$_pyname.1 \
"$pkgdir"/usr/share/man/man1/$_pyname.1
}
sha512sums="
25229542fcb790dfc96bb5f946628136dce342ae825edc7ed318651dac9840ec16f896198c357a4751bde8cda7ee7abb3fbc1f4e4abfa5a3cce7bc61f956f2e6 py3-gitlab-3.12.0.tar.gz
"