[arch-commits] Commit in python-cmarkgfm/repos/community-x86_64 (PKGBUILD PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Thu May 19 08:16:19 UTC 2022


    Date: Thursday, May 19, 2022 @ 08:16:19
  Author: alerque
Revision: 1209211

archrelease: copy trunk to community-x86_64

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

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

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-05-19 08:16:10 UTC (rev 1209210)
+++ PKGBUILD	2022-05-19 08:16:19 UTC (rev 1209211)
@@ -1,38 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Maintainer: Caleb Maclennan <caleb at alerque.com>
-
-pkgname=python-cmarkgfm
-pkgver=0.7.0
-pkgrel=1
-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' 'python-setuptools' 'python-cffi')
-checkdepends=('python-pytest-runner')
-source=("https://github.com/theacodes/cmarkgfm/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('e663e52d5dcb0799d8e15c7a1c06916a5b603ab32e95a12a03897001b6581c6e45aff1a985dc16a65ad05307e9f6c01f941e9210bea3d617439154cfbb1f1bce')
-
-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 setup.py build
-}
-
-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"
-}
-
-package() {
-  cd cmarkgfm-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-  install -Dm0644 -t "$pkgdir"/usr/share/licenses/$pkgname/ LICENSE.txt
-}

Copied: python-cmarkgfm/repos/community-x86_64/PKGBUILD (from rev 1209210, python-cmarkgfm/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-05-19 08:16:19 UTC (rev 1209211)
@@ -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=1
+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' '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=$(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