Date: Wednesday, April 5, 2023 @ 17:40:47
  Author: felixonmars
Revision: 1437827

archrelease: copy trunk to community-staging-any

Added:
  python-docutils/repos/community-staging-any/
  python-docutils/repos/community-staging-any/PKGBUILD
    (from rev 1437826, python-docutils/trunk/PKGBUILD)

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

Copied: python-docutils/repos/community-staging-any/PKGBUILD (from rev 1437826, 
python-docutils/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-05 17:40:47 UTC (rev 1437827)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Daniel M. Capella <[email protected]>
+# Contributor: Sébastien Luttringer
+# Contributor : Ionut Biru <[email protected]>
+# Contributor: Sergej Pupykin <[email protected]>
+
+_name=docutils
+pkgname=python-docutils
+pkgver=0.19
+pkgrel=4
+epoch=1
+pkgdesc='Set of tools for processing plaintext docs into formats such as HTML, 
XML, or LaTeX'
+arch=('any')
+url='http://docutils.sourceforge.net'
+license=('custom')
+depends=('python')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+             'python-wheel')
+source=("https://downloads.sourceforge.net/$_name/$_name-$pkgver.tar.gz";)
+sha512sums=('fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5')
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd $_name-$pkgver
+  # we need utf locale to valid utf8 tests
+  export LANG=en_US.UTF-8
+  PYTHONPATH="$PWD/build/python/" python test/alltests.py
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  # symlink without .py
+  for f in "$pkgdir"/usr/bin/*.py; do
+      ln -s "$(basename "$f")" "$pkgdir/usr/bin/$(basename "$f" .py)"
+  done
+
+  # 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"/docutils-$pkgver.dist-info/COPYING.txt \
+    "$pkgdir"/usr/share/licenses/$pkgname/COPYING.txt
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to