desktop/python-cssselect/PKGBUILD
2017-10-27 00:01:37 +02:00

55 lines
1.3 KiB
Bash

# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
pkgbase=python-cssselect
pkgname=('python2-cssselect' 'python3-cssselect')
pkgver=1.0.1
pkgrel=1
license=('BSD')
arch=('x86_64')
url="http://pypi.python.org/pypi/cssselect"
makedepends=('python3-setuptools' 'python2-setuptools' 'git')
checkdepends=('python3-pytest-runner' 'python2-pytest-runner' 'python3-lxml' 'python2-lxml')
source=("git+https://github.com/scrapy/cssselect.git#tag=v$pkgver")
md5sums=('SKIP')
prepare() {
cp -a cssselect{,-py2}
}
build() {
cd "$srcdir"/cssselect
python3 setup.py build
cd "$srcdir"/cssselect-py2
python2 setup.py build
}
#check() {
# cd "$srcdir"/cssselect
# python3 setup.py test
#
# cd "$srcdir"/cssselect-py2
# python2 setup.py test
#}
package_python3-cssselect() {
pkgdesc="A Python3 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=('python3')
cd "$srcdir"/cssselect
python3 setup.py install --root="${pkgdir}/" --optimize=1
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
package_python2-cssselect() {
pkgdesc="A Python2 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=('python2')
cd "$srcdir"/cssselect-py2
python2 setup.py install --root="${pkgdir}/" --optimize=1
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}