psykose deb62258ec */*: set --skip-build for python installs
this marginally increases install speed by not checking if it needs a rebuild.
also remove --prefix=/usr as it defaults to /usr already.

might break a build or two, will fix later
2023-01-10 04:19:31 +01:00

35 lines
1.1 KiB
Plaintext

# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-black
pkgver=0.3.12
pkgrel=3
pkgdesc="pytest plugin to enable format checking with black"
url="https://github.com/shopkeep/pytest-black"
arch="noarch"
license="MIT"
depends="python3 py3-pytest black py3-toml"
makedepends="py3-setuptools py3-setuptools_scm"
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
}
check() {
# Hack entry point by installing it
python3 setup.py install --root="$PWD/tmp_install"
# delesect tests that fails with pytest>=6.2
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH" pytest -v \
--deselect tests/test_black.py::test_exclude \
--deselect tests/test_black.py::test_exclude_folder \
--deselect tests/test_black.py::test_include
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="3bf6cc27a872f351ad1b49650d5b4758d14fea65627008204d2f45557c61e597def6aa6eb6f61fb439ebf783b4df997a3c4320ccbb65ee99d0dd9eaa6fde05bd pytest-black-0.3.12.tar.gz"