1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 20:55:20 +03:00
aports/testing/py3-gitlab/APKBUILD
psykose b71032c356 */*: invoke -m venv with --without-pip
we never use pip in the venv manually made for tests-
this might break 1-2 things unexpectedly, but

- those should be looked at anyway
- this has a severe speedup- even on a desktop machine with nvme, this
  makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small
  optimisation.
2023-02-09 22:55:20 +01:00

48 lines
1.3 KiB
Text

# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=py3-gitlab
_pyname=${pkgname/py3/python}
pkgver=3.13.0
pkgrel=0
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"
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 --clear --without-pip --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="
3591489497b3506d29721c20d3164095737d1bba67fddb081483db7058aae62bcad58bad31451e5159cac49a549667a4e1b622c79659030a1a93f3f5059da7aa py3-gitlab-3.13.0.tar.gz
"