Date: Thursday, April 6, 2023 @ 16:56:29
  Author: felixonmars
Revision: 1439812

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 1439811, python-cmarkgfm/trunk/PKGBUILD)

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

Copied: python-cmarkgfm/repos/community-staging-x86_64/PKGBUILD (from rev 
1439811, python-cmarkgfm/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-06 16:56:29 UTC (rev 1439812)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Caleb Maclennan <[email protected]>
+
+pkgname=python-cmarkgfm
+_pyname=${pkgname#python-}
+pkgver=2022.10.27
+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=('b5c1c622a7df9eb882bf152d98baeb61e9103f7683ec5d50e3eee1ada7caac2daf4e1e1e8c34566ab8c8e00136da9e65ae356e06e511da281b8de890aca85a86')
+
+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
+}

Reply via email to