[arch-commits] Commit in python-html5lib/repos (2 files)

Felix Yan felixonmars at archlinux.org
Mon Nov 9 16:57:28 UTC 2020


    Date: Monday, November 9, 2020 @ 16:57:28
  Author: felixonmars
Revision: 747738

archrelease: copy trunk to community-staging-any

Added:
  python-html5lib/repos/community-staging-any/
  python-html5lib/repos/community-staging-any/PKGBUILD
    (from rev 747735, python-html5lib/trunk/PKGBUILD)

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

Copied: python-html5lib/repos/community-staging-any/PKGBUILD (from rev 747735, python-html5lib/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-09 16:57:28 UTC (rev 747738)
@@ -0,0 +1,64 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+# Contributor: Erol V. Aktay <e.aktay at gmail.com>
+
+pkgbase=python-html5lib
+pkgname=('python2-html5lib' 'python-html5lib')
+pkgver=1.1
+pkgrel=2
+arch=('any')
+url="https://github.com/html5lib"
+license=('MIT')
+_deps=('six' 'webencodings')
+makedepends=('python-setuptools' 'python2-setuptools' "${_deps[@]/#/python-}" "${_deps[@]/#/python2-}")
+_checkdeps=('pytest' 'pytest-expect' 'lxml' 'mock')
+checkdepends=("${_checkdeps[@]/#/python-}" "${_checkdeps[@]/#/python2-}")
+_test_commit=71eebd59772d1d39aced0c0582ae9c09acf3ce6e
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/html5lib/html5lib-python/archive/${pkgver}.tar.gz"
+        "https://github.com/html5lib/html5lib-tests/archive/${_test_commit}.tar.gz")
+sha256sums=('66e9e24a53c10c27abb6be8a3cf2cf55824c6ea1cef8570a633cb223ec46e894'
+            'c866f5e4ae9ef34313e2b61fcb74849b6f8aef970bf8249956b6a5d142197087')
+
+prepare() {
+    cd "${srcdir}"/html5lib-python-${pkgver}
+
+    rmdir html5lib/tests/testdata
+    ln -sfT ../../../html5lib-tests-${_test_commit} html5lib/tests/testdata
+}
+
+build() {
+    cd "${srcdir}"/html5lib-python-${pkgver}
+
+    python setup.py build
+    python2 setup.py build
+}
+
+check() {
+    cd "${srcdir}"/html5lib-python-${pkgver}
+
+    py.test
+    py.test2
+}
+
+package_python-html5lib() {
+    pkgdesc="A Python HTML parser/tokenizer based on the WHATWG HTML5 spec"
+    depends=("${_deps[@]/#/python-}")
+    optdepends=('python-lxml: lxml treebuilder'
+                'python-genshi: genshi treewalker')
+    cd "${srcdir}"/html5lib-python-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python2-html5lib() {
+    pkgdesc="A Python2 HTML parser/tokenizer based on the WHATWG HTML5 spec"
+    depends=("${_deps[@]/#/python2-}")
+    optdepends=('python2-lxml: lxml treebuilder'
+                'python2-genshi: genshi treewalker')
+    cd "${srcdir}"/html5lib-python-${pkgver}
+
+    python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}



More information about the arch-commits mailing list