# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Carl George < arch at cgtx dot us >

pkgname=python2-unittest2
_pkgname=unittest2
pkgver=1.1.0
pkgrel=6
pkgdesc="New features in unittest for Python 2"
url="http://www.voidspace.org.uk/python/articles/unittest2.shtml"
arch=('any')
license=('BSD')
depends=('python2-six' 'python2-traceback2')
makedepends=('python2-setuptools')
source=("https://pypi.io/packages/source/u/unittest2/unittest2-$pkgver.tar.gz"
        LICENSE)
sha512sums=('3fba15728905f437767416ab4fd3573d3fb2319486ef84c52a9fa930ea84aa1f2ae29d6f58993e3509083625790e17b1ef8d9ac5de0e166c254897a3e7a202fa'
            '85242ed21eb191fa0bab16f3e390957f1c8b7bc3b79aefbea2d925feaa8248f33d6e22afaa7d1c07c5fcb5e800910aa2a1cb52d892c104337bbdb57a380373a2')

prepare() {
  sed -i "s/'argparse', //" ${_pkgname}-${pkgver}/setup.py
}

build() {
  cd ${_pkgname}-${pkgver}
  python2 setup.py build
}

package() {
  cd ${_pkgname}-${pkgver}
  python2 setup.py install --skip-build -O1 --root="${pkgdir}"
  install -Dm 644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm 644 README.txt "${pkgdir}/usr/share/doc/${pkgname}/README"
}

# vim: ts=2 sw=2 et:
