# Maintainer: Kyle Keen <keenerd@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Pierre Chapuis <catwell@archlinux.us>
# Contributor: Stefano Esposito <ragnarok@email.it>

pkgname=python-irc
pkgver=19.0.1
pkgrel=2
pkgdesc="IRC (Internet Relay Chat) protocol client library for Python"
depends=('python-six' 'python-pytz' 'python-more-itertools' 'python-jaraco'
         'python-tempora')
makedepends=('python-setuptools-scm')
checkdepends=('python-pytest' 'python-pytest-flake8' 'python-pytest-black'
              'python-pytest-cov' 'python-pytest-mypy')
arch=('any')
url="https://pypi.python.org/pypi/irc"
license=('LGPL')
source=("https://files.pythonhosted.org/packages/source/i/irc/irc-$pkgver.tar.gz")
sha256sums=('99fd5d1fa1d054dee4fbb81e0d5193dc1e8200db751d5da9a97850a62162b9ab')

build() {
  cd "irc-$pkgver"
  export LC_ALL=en_US.UTF-8
  python setup.py build
}

check() {
  cd "irc-$pkgver"
  export LC_ALL=en_US.UTF-8
  pytest .
}

package() {
  cd "irc-$pkgver"
  export LC_ALL=en_US.UTF-8
  python setup.py install --root="$pkgdir" --optimize=0
}
