[arch-commits] Commit in (4 files)

Daniel M. Capella polyzen at gemini.archlinux.org
Sun Jun 5 16:13:23 UTC 2022


    Date: Sunday, June 5, 2022 @ 16:13:23
  Author: polyzen
Revision: 1223119

Add python-rstcheck-core

Added:
  python-rstcheck-core/
  python-rstcheck-core/repos/
  python-rstcheck-core/trunk/
  python-rstcheck-core/trunk/PKGBUILD

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

Added: python-rstcheck-core/trunk/PKGBUILD
===================================================================
--- python-rstcheck-core/trunk/PKGBUILD	                        (rev 0)
+++ python-rstcheck-core/trunk/PKGBUILD	2022-06-05 16:13:23 UTC (rev 1223119)
@@ -0,0 +1,50 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=rstcheck-core
+pkgname=python-rstcheck-core
+pkgver=1.0.2
+pkgrel=1
+pkgdesc='Checks syntax of reStructuredText and code blocks nested within it'
+arch=('any')
+url=https://github.com/rstcheck/rstcheck
+license=('MIT')
+depends=('python-docutils' 'python-pydantic' 'python-typing_extensions')
+makedepends=('python-build' 'python-installer' 'python-poetry-core')
+checkdepends=('python-mock' 'python-pytest' 'python-pytest-mock'
+              'python-sphinx')
+optdepends=('python-sphinx: for Sphinx support'
+            'python-tomli: for pyproject.toml support')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('b06bee11f3679b283cbd6abf707bfe4d5fd2cf480cfa3ffe6d5c9238c6d4ae89')
+b2sums=('7cf348e19cd63d8e34d81b98884310c9e917b4985d13128920a5e2037538a4afa145e24a0dcb9ac03b862b385fa4df397e2272e7952c8f81a489aa4f726fa34d')
+
+prepare() {
+  cd $_name-$pkgver
+  # Remove include list https://github.com/pypa/wheel/issues/92
+  sed -i '/^include =/d' pyproject.toml
+}
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd $_name-$pkgver
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m installer dist/*.whl
+  PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # Symlink license file
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  install -d "$pkgdir"/usr/share/licenses/$pkgname
+  ln -s "$site_packages"/rstcheck_core-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list