archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pytest-isort / repos / community-any / PKGBUILD
blob8671071592d199919e1c6d276e423024b16b5e3d
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pytest-isort
4 pkgver=3.1.0
5 pkgrel=2
6 pkgdesc='pytest plugin to perform isort checks (import ordering)'
7 arch=('any')
8 license=('BSD')
9 url='https://github.com/moccu/pytest-isort'
10 depends=('python-pytest' 'python-isort')
11 makedepends=('python-build' 'python-installer' 'python-poetry-core')
12 source=("https://github.com/moccu/pytest-isort/archive/$pkgver/$pkgname-$pkgver.tar.gz")
13 sha512sums=('a01799b832783301818aba5d441cdb9167a367e2c434df9790e4b2d839a9cdab03683736f43339a07ef4444ca0bddfb1b6cd503db170b6544f8c14617e7398df')
15 build() {
16   cd pytest-isort-$pkgver
17   python -m build -nw
20 check() {
21   # Hack entry points by installing it
23   cd pytest-isort-$pkgver
24   python -m installer --destdir="$PWD/tmp_install" dist/*.whl
25   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
26   PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" pytest
29 package() {
30   cd pytest-isort-$pkgver
31   python -m installer --destdir="$pkgdir" dist/*.whl
32   install -Dm644 LICENSE.rst -t "$pkgdir"/usr/share/licenses/$pkgname/
33   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
34   rm "$pkgdir"/$site_packages/LICENSE.rst
37 # vim:set ts=2 sw=2 et: