# $Id: PKGBUILD 126075 2015-01-18 10:40:16Z fyan $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: SpepS <dreamspepser@yahoo.it>
# Contributor: James Bulmer <nekinie@gmail.com>

pkgbase=python-routes
pkgname=python2-routes
pkgver=2.1
pkgrel=1
pkgdesc="Routing recognition and generation tools"
arch=("any")
url="https://pypi.python.org/pypi/Routes"
license=("custom:BSD")
makedepends=('python2-setuptools' 'python2-repoze.lru')
checkdepends=('python2-nose' 'python2-webob' 'python2-coverage')
source=("https://pypi.python.org/packages/source/R/Routes/Routes-${pkgver}.tar.gz")
md5sums=('e6e463318a9dc6ad2f1b3040e998f0b4')

build() {
  cd "${srcdir}/Routes-${pkgver}/"
  python2 setup.py build
}

check() {
  cd "${srcdir}/Routes-${pkgver}/"
  nosetests2
}

package_python2-routes() {
  depends=("python2" "python2-repoze.lru")

  cd "${srcdir}/Routes-${pkgver}/"
  python2 setup.py install --root="${pkgdir}/" --optimize=1
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
