archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-jsonpickle / trunk / PKGBUILD
blob8f77ad1b2051f2729a99761a7b43ad249493a816
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-jsonpickle
4 pkgver=3.0.1
5 _commit=9caae7b5a9f98a699cd4bac3feb1f7cb632226d4
6 pkgrel=3
7 arch=('any')
8 pkgdesc="Python library for serializing any arbitrary object graph into JSON"
9 url="https://jsonpickle.github.io/"
10 license=('BSD')
11 depends=('python')
12 optdepends=("python-numpy: for serializing sklearn models, numpy arrays, and other numpy-based data"
13             "python-gmpy2: for serializing ecdsa module's keys")
14 makedepends=('git' 'python-setuptools-scm')
15 checkdepends=('python-numpy' 'python-feedparser' 'python-simplejson' 'python-gmpy2'
16               'python-pymongo' 'python-ujson' 'python-pandas' 'python-pytest')
17 source=("git+https://github.com/jsonpickle/jsonpickle.git#commit=$_commit")
18 sha512sums=('SKIP')
20 prepare() {
21   cd jsonpickle
22   # do not run coverage in an integration test
23   sed -i 's/--cov//' pytest.ini
26 build() {
27   cd jsonpickle
28   python setup.py build
31 check() {
32   cd jsonpickle
33   pytest
36 package() {
37   cd jsonpickle
38   python setup.py install --root="$pkgdir" --optimize=1
39   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/