diff options
| author | Leo <thinkabit.ukim@gmail.com> | 2019-11-19 12:02:31 +0100 |
|---|---|---|
| committer | Leo <thinkabit.ukim@gmail.com> | 2019-11-19 12:48:50 +0100 |
| commit | 86d7fb656e72fd0691f76faf2f807ad129b0cea6 (patch) | |
| tree | ced89380a61128b2874c7e0c93dc833d5794a66b | |
| parent | eb857dd112791cad78e982ea00114dba50ff4dd5 (diff) | |
| download | aports-86d7fb656e72fd0691f76faf2f807ad129b0cea6.tar.bz2 aports-86d7fb656e72fd0691f76faf2f807ad129b0cea6.tar.xz | |
main/py3-pygments: drop python2
| -rw-r--r-- | main/py3-pygments/APKBUILD | 61 |
1 files changed, 12 insertions, 49 deletions
diff --git a/main/py3-pygments/APKBUILD b/main/py3-pygments/APKBUILD index eaed575e77..b069856eb7 100644 --- a/main/py3-pygments/APKBUILD +++ b/main/py3-pygments/APKBUILD @@ -1,73 +1,36 @@ # Contributor: Peter Bui <pnutzh4x0r@gmail.com> # Maintainer: Matt Smith <mcs@darkregion.net> -pkgname=py-pygments +pkgname=py3-pygments _pkgname=Pygments pkgver=2.4.2 -pkgrel=1 +pkgrel=2 pkgdesc="A syntax highlighting package written in Python." url="http://pygments.org/" arch="noarch" license="BSD-2-Clause" -depends="py3-${pkgname#py-}" -makedepends="python2-dev python3-dev py-setuptools" -checkdepends="py-nose py3-nose" -subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarch" +depends="python3" +makedepends="py3-setuptools" +checkdepends="py3-nose" +subpackages="$pkgname-doc::noarch" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" -prepare() { - default_prepare - - # Soure files are modified during build with 2to3 tool, so we must build - # it separately for each Python version. - local python; for python in python2 python3; do - cp -r "$builddir" "$builddir-$python" - done -} +replaces="py-pygments" # Backwards compatibility +provides="py-pygments=$pkgver-r$pkgrel" # Backwards compatibility build() { - local python; for python in python2 python3; do - cd "$builddir"-$python - $python setup.py build - done + python3 setup.py build } check() { - local python; for python in python2 python3; do - cd "$builddir"-$python - $python tests/run.py - done + python3 tests/run.py } package() { - mkdir -p "$pkgdir" + python3 setup.py install --prefix=/usr --root="$pkgdir" mkdir -p "$pkgdir"/usr/bin - ln -s pygmentize-3 "$pkgdir"/usr/bin/pygmentize -} - -_py2() { - replaces="$pkgname" - _py python2 -} - -_py3() { - _py python3 -} - -_py() { - local python="$1" - local pyver="${1:6:1}" - pkgdesc="$pkgdesc (for $python)" - depends="$python" - install_if="$pkgname=$pkgver-r$pkgrel $python" - - cd "$builddir"-$python - $python setup.py install --prefix=/usr --root="$subpkgdir" - - local path; for path in "$subpkgdir"/usr/bin/*; do - mv "$path" "$path-$pyver" - done + ln -s pygmentize "$pkgdir"/usr/bin/pygmentize-3 } doc() { |
