[arch-commits] Commit in python-html5lib/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Sun Aug 18 22:28:45 UTC 2019


    Date: Sunday, August 18, 2019 @ 22:28:44
  Author: eschwartz
Revision: 500117

make the dependency specifying a bit easier to work with

duplicated depends across makedepends, checkdepends, and split package depends are awkward

Modified:
  python-html5lib/trunk/PKGBUILD

----------+
 PKGBUILD |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-18 22:27:35 UTC (rev 500116)
+++ PKGBUILD	2019-08-18 22:28:44 UTC (rev 500117)
@@ -10,9 +10,10 @@
 arch=('any')
 url="https://github.com/html5lib"
 license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-webencodings' 'python2-webencodings')
-checkdepends=('python-six' 'python2-six' 'python-pytest-expect' 'python2-pytest-expect'
-              'python-lxml' 'python2-lxml' 'python-mock' 'python2-mock')
+_deps=('six' 'webencodings')
+makedepends=('python-setuptools' 'python2-setuptools' "${_deps[@]/#/python-}" "${_deps[@]/#/python2-}")
+_checkdeps=('pytest-expect' 'lxml' 'mock')
+checkdepends=("${_checkdeps[@]/#/python-}" "${_checkdeps[@]/#/python2-}")
 _test_commit=c305da74fae50fb018870de7a042da36c1a93b65
 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")
@@ -42,7 +43,7 @@
 
 package_python-html5lib() {
     pkgdesc="A Python HTML parser/tokenizer based on the WHATWG HTML5 spec"
-    depends=('python' 'python-six' 'python-webencodings')
+    depends=("${_deps[@]/#/python-}")
     optdepends=('python-lxml: lxml treebuilder'
                 'python-genshi: genshi treewalker')
     cd "${srcdir}"/html5lib-python-${pkgver}
@@ -53,7 +54,7 @@
 
 package_python2-html5lib() {
     pkgdesc="A Python2 HTML parser/tokenizer based on the WHATWG HTML5 spec"
-    depends=('python2' 'python2-six' 'python2-webencodings')
+    depends=("${_deps[@]/#/python2-}")
     optdepends=('python2-lxml: lxml treebuilder'
                 'python2-genshi: genshi treewalker')
     cd "${srcdir}"/html5lib-python-${pkgver}


More information about the arch-commits mailing list