diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 17:53:15 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 17:53:53 +0100 |
commit | 604d7c82cfea0d2ca7da6a5bf608a7b9e35cac75 (patch) | |
tree | 8d08d4dcab33740244ef311d3af1caf28bbad013 /main/py-pygments | |
parent | c57df124ca90ca0b79f624a5b3751131ba7d1ac6 (diff) | |
download | aports-604d7c82cfea0d2ca7da6a5bf608a7b9e35cac75.tar.bz2 aports-604d7c82cfea0d2ca7da6a5bf608a7b9e35cac75.tar.xz |
main/py-pygments: fix broken py3 subpackage
Diffstat (limited to 'main/py-pygments')
-rw-r--r-- | main/py-pygments/APKBUILD | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/main/py-pygments/APKBUILD b/main/py-pygments/APKBUILD index 6ef649e354..25693e26ef 100644 --- a/main/py-pygments/APKBUILD +++ b/main/py-pygments/APKBUILD @@ -3,7 +3,7 @@ pkgname=py-pygments _pkgname=Pygments pkgver=2.1.3 -pkgrel=0 +pkgrel=1 pkgdesc="A syntax highlighting package written in Python." url="http://pygments.org/" arch="noarch" @@ -14,10 +14,21 @@ subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarc source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +prepare() { + default_prepare || return 1 + + # 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" || return 1 + done +} + build() { - cd "$builddir" - python2 setup.py build || return 1 - python3 setup.py build || return 1 + local python; for python in python2 python3; do + cd "$builddir"-$python + $python setup.py build || return 1 + done } package() { @@ -43,7 +54,7 @@ _py() { depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" - cd "$builddir" + cd "$builddir"-$python $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 local path; for path in "$subpkgdir"/usr/bin/*; do |