diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-11-15 22:21:41 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-11-15 22:21:41 (GMT) |
commit | 17520a20ea44f7cd1cbe25d1760e2277b84554a2 (patch) | |
tree | fc70858957487f47df31e2b1d968334982ae9c06 /abs/core | |
parent | 0c6c359df737180a355ecea24505a4f3b53b3358 (diff) | |
download | linhes_pkgbuild-17520a20ea44f7cd1cbe25d1760e2277b84554a2.zip linhes_pkgbuild-17520a20ea44f7cd1cbe25d1760e2277b84554a2.tar.gz linhes_pkgbuild-17520a20ea44f7cd1cbe25d1760e2277b84554a2.tar.bz2 |
python-pygments: 2.7.2
Diffstat (limited to 'abs/core')
-rw-r--r-- | abs/core/python_modules/python-pygments/PKGBUILD | 60 | ||||
-rw-r--r-- | abs/core/python_modules/python-pygments/python2-pygments.install | 7 |
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: |