PyroDevil / PKGBUILD secret
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

python-cssselect 0.9.1 PKGBUILD

View PKGBUILD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
pkgbase=python-cssselect
pkgname=('python-cssselect' 'python2-cssselect')
pkgver=0.9.1
pkgrel=1
license=('BSD')
arch=('any')
url="http://pypi.python.org/pypi/cssselect"
makedepends=('python2' 'python')
source=("http://pypi.python.org/packages/source/c/cssselect/cssselect-${pkgver}.tar.gz")
md5sums=('c74f45966277dc7a0f768b9b0f3522ac')
 
prepare() {
cp -r cssselect-${pkgver} python2-cssselect-${pkgver}
}
 
package_python-cssselect() {
pkgdesc="A Python3 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=('python')
 
cd cssselect-${pkgver}
python 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 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.