desktop/python2-cssselect/PKGBUILD
2012-11-01 01:17:52 +00:00

33 lines
928 B
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Martín González <koteccr at gmail dot com>
pkgname='python2-cssselect'
pkgver=0.7.1
pkgrel=1
pkgdesc="A Python2 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=('python2')
license=('BSD')
arch=('any')
url="http://pypi.python.org/pypi/cssselect"
makedepends=('python2')
source=("http://pypi.python.org/packages/source/c/cssselect/cssselect-${pkgver}.tar.gz")
md5sums=('c6c5e9a2e7ca226ce03f6f67a771379c')
build() {
cp -r cssselect-${pkgver} python2-cssselect-${pkgver}
}
package() {
cd python2-cssselect-${pkgver}
python2 setup.py install --root="${pkgdir}/" --optimize=1
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
# Fix python2 shebang
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
"${pkgdir}"/usr/lib/python2.7/site-packages/cssselect/tests.py
}