[arch-commits] Commit in python-cmarkgfm/trunk (PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Thu May 19 08:16:10 UTC 2022
Date: Thursday, May 19, 2022 @ 08:16:10
Author: alerque
Revision: 1209210
upgpkg: python-cmarkgfm 0.8.0-1
Modified:
python-cmarkgfm/trunk/PKGBUILD
----------+
PKGBUILD | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-05-19 08:07:58 UTC (rev 1209209)
+++ PKGBUILD 2022-05-19 08:16:10 UTC (rev 1209210)
@@ -2,7 +2,8 @@
# Maintainer: Caleb Maclennan <caleb at alerque.com>
pkgname=python-cmarkgfm
-pkgver=0.7.0
+_pyname=${pkgname#python-}
+pkgver=0.8.0
pkgrel=1
pkgdesc="Minimal bindings to GitHub's fork of cmark"
url="https://github.com/theacodes/cmarkgfm"
@@ -9,10 +10,12 @@
license=('MIT')
arch=('x86_64')
depends=('cmark-gfm' 'python-cffi')
-makedepends=('cmark-gfm' 'python-setuptools' 'python-cffi')
-checkdepends=('python-pytest-runner')
-source=("https://github.com/theacodes/cmarkgfm/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('e663e52d5dcb0799d8e15c7a1c06916a5b603ab32e95a12a03897001b6581c6e45aff1a985dc16a65ad05307e9f6c01f941e9210bea3d617439154cfbb1f1bce')
+makedepends=('cmark-gfm' 'python-build' 'python-installer' 'python-setuptools' 'python-cffi' 'python-wheel')
+checkdepends=('python-pytest')
+# Upstream did not tag the version on GitHub to match PyPi, see https://github.com/theacodes/cmarkgfm/issues/51
+# source=("https://github.com/theacodes/cmarkgfm/archive/$pkgver/$pkgname-$pkgver.tar.gz")
+source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz")
+sha512sums=('0f8f33306bbfbd4eec55e6a0f2379cd672a3f7e8072e013c454d7374f96e807dddaaf5dff277bf0d81751da2f4031b9d33eb86d8bbcd62ea0b8579f338d2fd94')
prepare() {
cd cmarkgfm-$pkgver
@@ -22,17 +25,17 @@
build() {
cd cmarkgfm-$pkgver
- python setup.py build
+ python -m build -wn
}
check() {
cd cmarkgfm-$pkgver
- # test failure in new cmark-gfm
- python setup.py pytest --addopts "--deselect tests/test_cmark.py::test_github_flavored_markdown_to_html_tasklist"
+ local _pyver=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ PYTHONPATH="$PWD/build/lib.linux-$CARCH-${_pyver}" pytest
}
package() {
cd cmarkgfm-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ python -m installer -d "$pkgdir" dist/*.whl
install -Dm0644 -t "$pkgdir"/usr/share/licenses/$pkgname/ LICENSE.txt
}
More information about the arch-commits
mailing list