summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c9f0dc4eda04ccac21dbcee184f626ed722df9e (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
53
54
55
56
57
58
59
# $Id$
# Maintainer: Chris Severance aur.severach AatT spamgourmet.com

set -u
_pyver="python2"
_pybase='behave'
pkgname="${_pyver}-${_pybase}"
pkgver='1.2.6'
pkgrel='1'
pkgdesc='behaviour-driven development, Python style'
arch=('any')
#url="https://pypi.python.org/pypi/${_pybase}/"
url="https://github.com/behave/${_pybase}"
license=('BSD')
_pydepends=( # See setup.py, README.rst, and requirements.txt for version dependencies
  "${_pyver}-parse>=1.6.3"    # COM
  "${_pyver}-parse_type>=0.3.4" # AUR
  "${_pyver}-six"             # COM
)
if [ "${_pyver}" = 'python2' ]; then
  _pydepends+=('python2-enum34')
fi
depends=("${_pyver}" "${_pydepends[@]}")
makedepends=("${_pyver}" "${_pyver}-distribute") # same as python-setuptools
_srcdir="${_pybase}-${pkgver}"
#_verwatch=("${url}/releases" "${url#*github.com}/archive/v\(.*\)\.tar\.gz" 'l')
source=("${_pybase}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
#_verwatch=("https://pypi.python.org/simple/${_pybase//_/-}/" "${_pybase}-\([0-9\.]\+\)\.tar\.gz" 't')
#source=("https://pypi.python.org/packages/source/${_pybase: 0:1}/${_pybase}/${_pybase}-${pkgver}.tar.gz")
sha256sums=('5178c98857830810d7f7d8b35207e0e4f72999810c1241dec39e753898fab796')

build() {
  set -u
  cd "${_srcdir}"
  ${_pyver} setup.py build
  set +u
}

check() {
  set -u
  cd "${_srcdir}"
  # If pip is installed, some package tests download missing packages. We can't allow that.
  #${_pyver} setup.py test --verbose
  set +u
}

package() {
  set -u
  cd "${_srcdir}"
  ${_pyver} setup.py install --root="${pkgdir}"
  install -Dpm644 'LICENSE' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  if [ "${_pyver}" = 'python2' ]; then
    mv "${pkgdir}/usr/bin/behave" "${pkgdir}/usr/bin/behave2"
  fi
  set +u
}
set +u

# vim:set ts=2 sw=2 et: