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

David Runge dvzrv at gemini.archlinux.org
Thu Oct 21 19:34:58 UTC 2021


    Date: Thursday, October 21, 2021 @ 19:34:58
  Author: dvzrv
Revision: 1032042

upgpkg: python-mistune 2.0.0rc1-1: Upgrade to non-stable 2.0.0rc1 release.

As hyperkitty left us with a requirement on a non-stable mistune version, we have to upgrade:
https://gitlab.com/mailman/hyperkitty/-/issues/395

Add python-pytest to checkdepends and run tests in check().
Install files in package() in accordance with python package guidelines.
Install docs.

Modified:
  python-mistune/trunk/PKGBUILD

----------+
 PKGBUILD |   29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-10-21 19:34:17 UTC (rev 1032041)
+++ PKGBUILD	2021-10-21 19:34:58 UTC (rev 1032042)
@@ -3,21 +3,34 @@
 
 _pkgname=mistune
 pkgname=python-mistune
-pkgver=0.8.4
-pkgrel=6
-pkgdesc="The fastest markdown parser in pure Python with renderer feature."
+pkgver=2.0.0rc1
+pkgrel=1
+pkgdesc="A fast yet powerful Python Markdown parser with renderers and plugins"
 arch=('any')
 url="https://github.com/lepture/mistune"
 license=('BSD')
 depends=('python')
 makedepends=('python-setuptools')
-source=("$pkgbase-$pkgver.tgz::https://github.com/lepture/mistune/archive/v${pkgver}.tar.gz")
-md5sums=('22fc9ea84220214a2b9b2b5b4213e209')
+checkdepends=('python-pytest')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/lepture/mistune/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('02d75f72f992cf73e97ab52a531cc68db289beede8631aa51e836ea16eced1853f6120b21b1f06aff69698ec7ed5ea74282de849687a75aeb851e990f67614a0')
+b2sums=('73440038e056eb610cf26783d49572e3687f716307534ec3e74e20f370276e480c1d140d78ddbddbb441fbada9ec604bedb3c34dd5019ee82d20cb529726d030')
 
+build() {
+  cd "${_pkgname}-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "${_pkgname}-$pkgver"
+  pytest -vv
+}
+
 package() {
-  cd "$srcdir/${_pkgname}-$pkgver"
-  python setup.py install --root="$pkgdir/"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/python-mistune/LICENSE"
+  cd "${_pkgname}-$pkgver"
+  python setup.py install --optimize=1 --root="$pkgdir/"
+  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/${pkgname}/"
+  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname}/"
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list