diff options
Diffstat (limited to 'testing/py-cssselect')
-rw-r--r-- | testing/py-cssselect/APKBUILD | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/testing/py-cssselect/APKBUILD b/testing/py-cssselect/APKBUILD index b0e3600d12..fd49136e5b 100644 --- a/testing/py-cssselect/APKBUILD +++ b/testing/py-cssselect/APKBUILD @@ -1,42 +1,47 @@ -# Contributor: Francesco Colista <francesco.colista@gmail.com> -# Maintainer: Francesco Colista <francesco.colista@gmail.com> +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=py-cssselect _pkgname=cssselect -pkgver=0.9.1 +pkgver=0.9.2 pkgrel=0 pkgdesc="A Python library that parses CSS3 Selectors and translates them to XPath 1.0" url="http://pypi.python.org/pypi/cssselect" arch="noarch" license="BSD" depends="" -depends_dev="python-dev" -makedepends="$depends_dev" +makedepends="python2-dev python3-dev py-setuptools" install="" -subpackages="" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python setup.py build || return 1 + cd "$builddir" + python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python setup.py install --root="${pkgdir}/" --optimize=1 - install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE + mkdir -p "$pkgdir" +} + + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" } -md5sums="c74f45966277dc7a0f768b9b0f3522ac cssselect-0.9.1.tar.gz" -sha256sums="0535a7e27014874b27ae3a4d33e8749e345bdfa62766195208b7996bf1100682 cssselect-0.9.1.tar.gz" -sha512sums="c4cd2c8d6fbfa99b836554685dd59e1e794e1fab06fcf4419a226b0608a05d58be5af54e507003f2a233a22f03d59d3d63c0bf19b3314f15c95ab3ce5f4db6cc cssselect-0.9.1.tar.gz" +_py3() { + _py python3 +} +md5sums="4c5931d8456dfe72fa4662f9c0509bfa cssselect-0.9.2.tar.gz" +sha256sums="713b5b99ef08022257b3409c7ae1b18b2c6536b3f155e6237c5cfba0f67ae6f5 cssselect-0.9.2.tar.gz" +sha512sums="313965d3a0ad37b24d72d6faf861c04e7af7e4ff06f58450a23585c45bd9f247e565a4b7d594c008d40625601c2b8e76919801b3d77cfd62c7edc20cf366c1f9 cssselect-0.9.2.tar.gz" |