aports/testing/py3-b2sdk/APKBUILD
2025-01-26 23:24:38 +00:00

57 lines
1.3 KiB
Text

# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
maintainer="lauren n. liberda <lauren@selfisekai.rocks>"
pkgname=py3-b2sdk
pkgver=2.8.0
pkgrel=0
pkgdesc="Python library to access B2 cloud storage"
url="https://github.com/Backblaze/b2-sdk-python"
arch="noarch"
license="MIT AND Apache-2.0"
depends="
py3-annotated-types
py3-logfury
py3-requests
python3
"
makedepends="
py3-gpep517
py3-installer
py3-pdm-backend
py3-virtualenv
"
checkdepends="
py3-pytest-lazy-fixtures
py3-pytest-mock
py3-pytest-timeout
py3-tqdm
pytest
"
subpackages="$pkgname-pyc"
source="
https://github.com/Backblaze/b2-sdk-python/archive/v$pkgver/py3-b2sdk-$pkgver.tar.gz
"
builddir="$srcdir/b2-sdk-python-$pkgver"
export PDM_BUILD_SCM_VERSION="$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
# "integration" tests require backblaze creds
.testenv/bin/python3 -m pytest -k 'not integration and not test_set_locale_context_manager'
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
cd5332b664ef50f21077ae6d8a7a3393ba5468dbf7438b8d8a67f3e3c92e495c5994cbca08fcb55a72d49fcbbde06febde1391d410b4582066cf7e14fc9b5b67 py3-b2sdk-2.8.0.tar.gz
"