mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
60 lines
1.6 KiB
Bash
60 lines
1.6 KiB
Bash
# Contributor: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Chris Warrick <aur@chriswarrick.com>
|
|
|
|
pkgbase=python-pygal
|
|
pkgname=('python3-pygal' 'python2-pygal')
|
|
epoch=1
|
|
pkgver=2.4.0
|
|
pkgrel=1
|
|
pkgdesc='A Python SVG graph plotting library'
|
|
arch=('any')
|
|
url='http://pygal.org/'
|
|
license=('LGPL3')
|
|
makedepends=('python3-setuptools' 'python2-setuptools')
|
|
checkdepends=('python3-pytest' 'python2-pytest' 'python3-lxml' 'python2-lxml'
|
|
'python3-pyquery' 'python2-pyquery' 'python3-flask' # 'python3-cairosvg'
|
|
'python2-flask' 'python3-pytest-runner' 'python2-pytest-runner')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/Kozea/pygal/archive/$pkgver.tar.gz")
|
|
md5sums=('5c688d30f8e75dced194bfa612f45589')
|
|
|
|
prepare() {
|
|
cp -a pygal-$pkgver{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/pygal-$pkgver
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir"/pygal-$pkgver-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir"/pygal-$pkgver
|
|
LC_CTYPE=en_US.UTF-8 py.test pygal/
|
|
|
|
cd "$srcdir"/pygal-$pkgver-py2
|
|
py.test2 pygal/
|
|
}
|
|
|
|
package_python3-pygal() {
|
|
depends=('python3-setuptools')
|
|
optdepends=('python3-lxml: for XML output through lxml instead of xml.etree'
|
|
'python3-cairosvg: for PNG output')
|
|
|
|
cd pygal-$pkgver
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
}
|
|
|
|
package_python2-pygal() {
|
|
depends=('python2-setuptools')
|
|
optdepends=('python2-lxml: for XML output through lxml instead of xml.etree')
|
|
|
|
cd pygal-$pkgver-py2
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
|
|
mv "$pkgdir"/usr/bin/pygal_gen{,2}.py
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|