archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pytest-pylint / trunk / PKGBUILD
blobec2ca2eed5537dcfa6522180ef97b59ca12e5fde
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _name=pytest-pylint
4 pkgname=python-pytest-pylint
5 pkgver=0.19.0
6 pkgrel=3
7 pkgdesc='pytest plugin to check source code with pylint'
8 arch=('any')
9 license=('MIT')
10 url='https://github.com/carsongee/pytest-pylint'
11 depends=('python-pytest' 'python-pylint' 'python-toml')
12 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
13 source=("$pkgname-$pkgver.tar.gz::https://github.com/carsongee/pytest-pylint/archive/v$pkgver.tar.gz")
14 sha512sums=('94503757bf774ffbba56687cda7689a95748fe437759e29868105bc5f639b03782308c8e86eae7236ab99188674de5596053da5c33ebd90c603e396504047996')
16 prepare() {
17   # pytest-runner is certainly not required to build a wheel...
18   sed -e '/pytest-runner/d' -i $_name-$pkgver/setup.py
21 build() {
22   cd $_name-$pkgver
23   python -m build --wheel --no-isolation
26 check() {
27   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
29   cd $_name-$pkgver
30   # install to temporary location, as importlib is used
31   python -m installer --destdir=test_dir dist/*.whl
32   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
33   pytest -vv --ignore test_dir/
36 package() {
37   cd $_name-$pkgver
38   python -m installer --destdir="$pkgdir" dist/*.whl
39   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
42 # vim:set ts=2 sw=2 et: