diff options
Diffstat (limited to 'testing/py-sphinxcontrib-spelling/APKBUILD')
-rw-r--r-- | testing/py-sphinxcontrib-spelling/APKBUILD | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/testing/py-sphinxcontrib-spelling/APKBUILD b/testing/py-sphinxcontrib-spelling/APKBUILD index 48c00d06e2..e694cbae6b 100644 --- a/testing/py-sphinxcontrib-spelling/APKBUILD +++ b/testing/py-sphinxcontrib-spelling/APKBUILD @@ -8,11 +8,11 @@ pkgdesc="Sphinx spelling extension" url="https://pypi.python.org/pypi/sphinxcontrib-spelling" arch="noarch" license="BSD" -depends="python2 py-sphinx py-enchant" +depends="py-sphinx py-enchant" depends_dev="" -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" install="" -subpackages="" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" _builddir="$srcdir"/$_pkgname-$pkgver @@ -29,11 +29,32 @@ prepare() { build() { cd "$_builddir" python2 setup.py build || return 1 + python3 setup.py build } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="c6758dd166486dc609a7aacb8c97cabf sphinxcontrib-spelling-2.1.1.tar.gz" |