summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/core/python_modules/python-pygments/PKGBUILD60
-rw-r--r--abs/core/python_modules/python-pygments/python2-pygments.install7
2 files changed, 21 insertions, 46 deletions
diff --git a/abs/core/python_modules/python-pygments/PKGBUILD b/abs/core/python_modules/python-pygments/PKGBUILD
index ef7fc43..20edf45 100644
--- a/abs/core/python_modules/python-pygments/PKGBUILD
+++ b/abs/core/python_modules/python-pygments/PKGBUILD
@@ -1,62 +1,44 @@
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Timm Preetz <timm@preetz.us>
-pkgname=('python-pygments' 'python2-pygments' 'pygmentize')
-pkgver=2.3.1
-pkgrel=1
+pkgname=python-pygments
+pkgver=2.7.2
+pkgrel=3
pkgdesc="Python syntax highlighter"
arch=('any')
-url="http://pygments.org/"
+url="https://pygments.org/"
license=('BSD')
-makedepends=('python-setuptools' 'python2-setuptools')
-options=('!emptydirs')
+depends=('python-setuptools')
+makedepends=('python-sphinx')
+checkdepends=('python-pytest')
+provides=('pygmentize')
+conflicts=('pygmentize')
+replaces=('pygmentize')
source=(https://pypi.org/packages/source/P/Pygments/Pygments-$pkgver.tar.gz)
-sha256sums=('5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a')
-
-package_python-pygments() {
- depends=('python-setuptools')
+sha256sums=('381985fcc551eb9d37c52088a32914e00517e57f4a21609f48141ba08e193fa0')
+build() {
cd "$srcdir/Pygments-$pkgver"
-
- python3 setup.py install --root="$pkgdir" -O1
-
- # pygmentize is shipped in its own package
- rm "$pkgdir/usr/bin/pygmentize"
-
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ make -C doc html
}
-package_python2-pygments() {
- depends=('python2-setuptools')
- install=python2-pygments.install
-
+check() {
cd "$srcdir/Pygments-$pkgver"
-
- python2 setup.py install --root="$pkgdir" -O1
-
- # pygmentize is shipped in its own package
- rm "$pkgdir/usr/bin/pygmentize"
-
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ PYTHONDONTWRITEBYTECODE=1 pytest
}
-package_pygmentize() {
- depends=('python-pygments')
-
+package() {
cd "$srcdir/Pygments-$pkgver"
+ export PYTHONHASHSEED=0
python3 setup.py install --root="$pkgdir" -O1
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
- # Remove all files except for usr/bin/pygmentize
- find "$pkgdir" -type f -not -name pygmentize -delete
-
- # Drop version dependency from console script
- sed -i "s/Pygments==$pkgver/Pygments/g" "$pkgdir/usr/bin/pygmentize"
-
+ 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 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
diff --git a/abs/core/python_modules/python-pygments/python2-pygments.install b/abs/core/python_modules/python-pygments/python2-pygments.install
deleted file mode 100644
index 3949246..0000000
--- a/abs/core/python_modules/python-pygments/python2-pygments.install
+++ /dev/null
@@ -1,7 +0,0 @@
-post_upgrade() {
- if (($(vercmp $2 2.0.2-2) < 0)); then
- echo ':: /usr/bin/pygmentize has been moved to the pygmentize package'
- fi
-}
-
-# vim:set ts=2 sw=2 et: