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

Caleb Maclennan alerque at gemini.archlinux.org
Mon Sep 5 09:28:10 UTC 2022


    Date: Monday, September 5, 2022 @ 09:28:10
  Author: alerque
Revision: 1292992

archrelease: copy trunk to community-staging-x86_64

Added:
  python-cmarkgfm/repos/community-staging-x86_64/
  python-cmarkgfm/repos/community-staging-x86_64/PKGBUILD
    (from rev 1292991, python-cmarkgfm/trunk/PKGBUILD)

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

Copied: python-cmarkgfm/repos/community-staging-x86_64/PKGBUILD (from rev 1292991, python-cmarkgfm/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-09-05 09:28:10 UTC (rev 1292992)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+
+pkgname=python-cmarkgfm
+_pyname=${pkgname#python-}
+pkgver=0.8.0
+pkgrel=2
+pkgdesc="Minimal bindings to GitHub's fork of cmark"
+url="https://github.com/theacodes/cmarkgfm"
+license=('MIT')
+arch=('x86_64')
+depends=('cmark-gfm' 'python-cffi')
+makedepends=('cmark-gfm' 'cython' '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
+  sed -e '/include_dirs=/a libraries=["cmark-gfm", "cmark-gfm-extensions"],' \
+      -i src/cmarkgfm/build_cmark.py
+}
+
+build() {
+  cd cmarkgfm-$pkgver
+  python -m build -wn
+}
+
+check() {
+  cd cmarkgfm-$pkgver
+  local _pyver=cpython-$(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 -m installer -d "$pkgdir" dist/*.whl
+  install -Dm0644 -t "$pkgdir"/usr/share/licenses/$pkgname/ LICENSE.txt
+}



More information about the arch-commits mailing list