Date: Monday, March 9, 2020 @ 06:16:00
  Author: foutrelis
Revision: 592747

upgpkg: python-pygments 2.6.1-2: Run tests; install docs and man page.

Modified:
  python-pygments/trunk/PKGBUILD

----------+
 PKGBUILD |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-03-09 04:55:56 UTC (rev 592746)
+++ PKGBUILD    2020-03-09 06:16:00 UTC (rev 592747)
@@ -3,12 +3,14 @@
 
 pkgname=python-pygments
 pkgver=2.6.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Python syntax highlighter"
 arch=('any')
 url="https://pygments.org/";
 license=('BSD')
 depends=('python-setuptools')
+makedepends=('python-sphinx')
+checkdepends=('python-pytest')
 provides=('pygmentize')
 conflicts=('pygmentize')
 replaces=('pygmentize')
@@ -15,13 +17,27 @@
 source=(https://pypi.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz)
 sha256sums=('647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44')
 
+build() {
+  cd "$srcdir/Pygments-$pkgver"
+  make -C doc html
+}
+
+check() {
+  cd "$srcdir/Pygments-$pkgver"
+  pytest
+}
+
 package() {
   cd "$srcdir/Pygments-$pkgver"
 
   python3 setup.py install --root="$pkgdir" -O1
+  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+
+  mkdir -p "$pkgdir/usr/share/doc"
+  cp -rT doc/_build/html "$pkgdir/usr/share/doc/$pkgname"
+  install -Dm644 doc/pygmentize.1 -t "$pkgdir/usr/share/man/man1"
   install -Dm644 external/pygments.bashcomp \
     "$pkgdir/usr/share/bash-completion/completions/pygmentize"
-  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
 }
 
 # vim:set ts=2 sw=2 et:

Reply via email to