diff --git a/backports/py3-gitlab/APKBUILD b/backports/py3-gitlab/APKBUILD new file mode 100644 index 0000000..f4119e7 --- /dev/null +++ b/backports/py3-gitlab/APKBUILD @@ -0,0 +1,49 @@ +# Maintainer: Hoang Nguyen +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 +"