summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-pytest-runner/PKGBUILD
blob: 5d106ce88869f633b94c119c8f8c08ab045e8d04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgbase=python-pytest-runner
pkgname=('python2-pytest-runner')
pkgver=2.11.1
pkgrel=1
pkgdesc="Invoke py.test as distutils command with dependency resolution"
arch=('any')
license=('MIT')
url="https://github.com/pytest-dev/pytest-runner"
makedepends=('python2-pytest' 'python2-setuptools-scm' 'git')
source=("git+https://github.com/pytest-dev/pytest-runner.git#tag=$pkgver")
sha512sums=('SKIP')

prepare() {
  cp -a pytest-runner{,-py2}
}

build() {
#  cd "$srcdir"/pytest-runner
#  python setup.py build

  cd "$srcdir"/pytest-runner-py2
  python2 setup.py build
}

check() {
#  cd "$srcdir"/pytest-runner
#  python setup.py egg_info
#  PYTHONPATH="$PWD" pytest

  cd "$srcdir"/pytest-runner-py2
  python2 setup.py egg_info
  PYTHONPATH="$PWD" pytest2
}

package_python-pytest-runner() {
  depends=('python-pytest')

  cd pytest-runner
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_python2-pytest-runner() {
  depends=('python2-pytest')

  cd pytest-runner-py2
  python2 setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}