diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 17:39:13 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 17:43:11 +0100 |
commit | 795faa994b6d80173cbe4f7e81186f5c3fb26428 (patch) | |
tree | 8fceabd910c84c3234e0d01cd64a9039093563af /main/py-docutils | |
parent | 84b018b35cdf5fe395928db61ddcbde7fa6ba169 (diff) | |
download | aports-795faa994b6d80173cbe4f7e81186f5c3fb26428.tar.bz2 aports-795faa994b6d80173cbe4f7e81186f5c3fb26428.tar.xz |
main/py-docutils: fix broken py3 subpackage
docutils uses 2to3 during build to make their crappy code
compatible with Python 3, so we must run build for each Python
version separately.
Diffstat (limited to 'main/py-docutils')
-rw-r--r-- | main/py-docutils/APKBUILD | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/main/py-docutils/APKBUILD b/main/py-docutils/APKBUILD index 4ec355a5bb..b679d47111 100644 --- a/main/py-docutils/APKBUILD +++ b/main/py-docutils/APKBUILD @@ -3,7 +3,7 @@ pkgname=py-docutils _pkgname=docutils pkgver=0.12 -pkgrel=2 +pkgrel=3 pkgdesc="Documentation Utilities for Python" url="http://docutils.sourceforge.net/" arch="noarch" @@ -14,10 +14,19 @@ subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarc source="http://downloads.sourceforge.net/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +prepare() { + default_prepare || return 1 + + 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() { @@ -49,7 +58,7 @@ _py() { depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" - cd "$builddir" + cd "$builddir"-$python $python setup.py install --prefix=/usr --root="$subpkgdir" # Remove .py extension and add version suffix to executable files. |