aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-black/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pytest-black/APKBUILD')
-rw-r--r--community/py3-pytest-black/APKBUILD38
1 files changed, 27 insertions, 11 deletions
diff --git a/community/py3-pytest-black/APKBUILD b/community/py3-pytest-black/APKBUILD
index 0317f78fb98..cc11a4febc2 100644
--- a/community/py3-pytest-black/APKBUILD
+++ b/community/py3-pytest-black/APKBUILD
@@ -1,29 +1,45 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
-# Maintainer: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-pytest-black
pkgver=0.3.12
-pkgrel=0
+pkgrel=7
pkgdesc="pytest plugin to enable format checking with black"
url="https://github.com/shopkeep/pytest-black"
-arch="noarch !mips !mips64 !s390x" # Blocked by black
+arch="noarch"
license="MIT"
-depends="python3 py3-pytest black py3-toml"
-makedepends="py3-setuptools py3-setuptools_scm"
+depends="
+ py3-pytest
+ black
+ py3-toml
+ "
+makedepends="
+ py3-gpep517
+ py3-setuptools
+ py3-setuptools_scm
+ py3-wheel
+ "
+checkdepends="py3-pytest"
+subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/p/pytest-black/pytest-black-$pkgver.tar.gz"
builddir="$srcdir/pytest-black-$pkgver"
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- # Hack entry point by installing it
- python3 setup.py install --root="$PWD/tmp_install"
- PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH" pytest
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
-sha512sums="3bf6cc27a872f351ad1b49650d5b4758d14fea65627008204d2f45557c61e597def6aa6eb6f61fb439ebf783b4df997a3c4320ccbb65ee99d0dd9eaa6fde05bd pytest-black-0.3.12.tar.gz"
+sha512sums="
+3bf6cc27a872f351ad1b49650d5b4758d14fea65627008204d2f45557c61e597def6aa6eb6f61fb439ebf783b4df997a3c4320ccbb65ee99d0dd9eaa6fde05bd pytest-black-0.3.12.tar.gz
+"