[arch-commits] Commit in python-cssselect/repos (staging-any staging-any/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Mon Nov 9 15:47:11 UTC 2020


    Date: Monday, November 9, 2020 @ 15:47:11
  Author: felixonmars
Revision: 399759

archrelease: copy trunk to staging-any

Added:
  python-cssselect/repos/staging-any/
  python-cssselect/repos/staging-any/PKGBUILD
    (from rev 399758, python-cssselect/trunk/PKGBUILD)

----------+
 PKGBUILD |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

Copied: python-cssselect/repos/staging-any/PKGBUILD (from rev 399758, python-cssselect/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2020-11-09 15:47:11 UTC (rev 399759)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
+
+pkgbase=python-cssselect
+pkgname=('python-cssselect' 'python2-cssselect')
+pkgver=1.1.0
+pkgrel=5
+license=('BSD')
+arch=('any')
+url="https://pypi.python.org/pypi/cssselect"
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-lxml' 'python2-lxml')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/scrapy/cssselect/archive/v$pkgver.tar.gz")
+sha512sums=('b33bca6a026f4de37b75606fd238dbd170b57d06288fbff3ea97ce79685a99af275fb8522b04ea9d6693aba5a18541d70b657191fdad881be79718bcf2e7655c')
+
+prepare() {
+  cp -a cssselect-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/cssselect-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/cssselect-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/cssselect-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/cssselect-$pkgver-py2
+  python2 setup.py pytest
+}
+
+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 cssselect-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list