# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Matmas <matmas@matmas.net>
# Contributor: Thomas Gubler <thomasgubler@gmail.com>
# Contributor: Daniel YC Lin <dlin.tw at gmail>
# Contributor: Florian Bruhin <archlinux.org@the-compiler.org>

pkgname=python-websocket-client
pkgver=1.9.0
pkgrel=1
pkgdesc="WebSocket client library for Python"
arch=('any')
url="https://github.com/websocket-client/websocket-client"
license=('LGPL')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/w/websocket-client/websocket_client-$pkgver.tar.gz")
sha512sums=('63385845aaaf792167d681c4b3089b09ea4dedbf931fa1f4ebc55648b6d864c2a479ac61f758d6a7967ce84e59e197613c976069f64381599c274f89c3edd0b4')

build() {
  cd websocket_client-$pkgver
  python setup.py build
}

check() {
  cd websocket_client-$pkgver
  pytest
}

package() {
  cd websocket_client-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

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