[arch-commits] Commit in python-cssselect/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Fri Oct 21 18:01:25 UTC 2016
Date: Friday, October 21, 2016 @ 18:01:25
Author: felixonmars
Revision: 279123
upgpkg: python-cssselect 1.0.0-1
Modified:
python-cssselect/trunk/PKGBUILD
----------+
PKGBUILD | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-10-21 18:00:18 UTC (rev 279122)
+++ PKGBUILD 2016-10-21 18:01:25 UTC (rev 279123)
@@ -4,27 +4,44 @@
pkgbase=python-cssselect
pkgname=('python-cssselect' 'python2-cssselect')
-pkgver=0.9.2
+pkgver=1.0.0
pkgrel=1
license=('BSD')
arch=('any')
url="http://pypi.python.org/pypi/cssselect"
-makedepends=('python2' 'python')
-source=("https://pypi.io/packages/source/c/cssselect/cssselect-${pkgver}.tar.gz")
-md5sums=('4c5931d8456dfe72fa4662f9c0509bfa')
+makedepends=('python-setuptools' 'python2-setuptools' 'git')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-lxml' 'python2-lxml')
+source=("git+https://github.com/scrapy/cssselect.git#tag=v$pkgver")
+md5sums=('SKIP')
prepare() {
- cp -a cssselect-${pkgver} python2-cssselect-${pkgver}
+ cp -a cssselect{,-py2}
}
+build() {
+ cd "$srcdir"/cssselect
+ python setup.py build
+
+ cd "$srcdir"/cssselect-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/cssselect
+ python setup.py ptr
+
+ cd "$srcdir"/cssselect-py2
+ python2 setup.py ptr
+}
+
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
+ cd cssselect
+ python setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-cssselect() {
@@ -31,12 +48,8 @@
pkgdesc="A Python2 library that parses CSS3 Selectors and translates them to XPath 1.0"
depends=('python2')
- cd python2-cssselect-${pkgver}
-
- # Fix python2 shebang
- sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' cssselect/tests.py
-
- python2 setup.py install --root="${pkgdir}/" --optimize=1
+ cd cssselect-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
More information about the arch-commits
mailing list