1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pytest-black
5 _commit=1d0d34a44004252ce73368ac3bf34354c06a5131
7 pkgdesc="A pytest plugin to enable format checking with black"
10 url="https://github.com/shopkeep/pytest-black/"
11 depends=('python-black' 'python-pytest' 'python-toml')
12 makedepends=('git' 'python-setuptools-scm')
13 source=("git+https://github.com/shopkeep/pytest-black.git#commit=$_commit")
19 git cherry-pick -n edcbcae7d55a992e785c7fc001f9d3880b197ea2
28 # Hack entry points by installing it
31 python setup.py install --root="$PWD/tmp_install" --optimize=1
32 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
33 PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH:$PWD/tests" py.test
38 python setup.py install --root="$pkgdir" --optimize=1
39 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/