aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-enchant/APKBUILD
diff options
context:
space:
mode:
authorKeith Maxwell <keith.maxwell@gmail.com>2018-08-12 14:04:25 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-31 06:17:04 +0000
commit5f2c73d767af2a6f1f988b5958d84fa1e0c1f7ac (patch)
tree6761618286a2fb5b3ca75c2f9ce076afadecc8bf /testing/py-enchant/APKBUILD
parent14a7503f1044f16d60c59267b2c03367d836a774 (diff)
downloadaports-5f2c73d767af2a6f1f988b5958d84fa1e0c1f7ac.tar.bz2
aports-5f2c73d767af2a6f1f988b5958d84fa1e0c1f7ac.tar.xz
testing/py-enchant: add a py3- subpackage
Diffstat (limited to 'testing/py-enchant/APKBUILD')
-rw-r--r--testing/py-enchant/APKBUILD37
1 files changed, 29 insertions, 8 deletions
diff --git a/testing/py-enchant/APKBUILD b/testing/py-enchant/APKBUILD
index b309702782..d9224ff4ed 100644
--- a/testing/py-enchant/APKBUILD
+++ b/testing/py-enchant/APKBUILD
@@ -8,26 +8,47 @@ pkgdesc="A spellchecking library for Python"
url="https://github.com/rfk/pyenchant"
arch="noarch"
license="LGPL-2.0-or-later"
-depends="python2 enchant"
+depends="enchant"
depends_dev=""
-makedepends="python2-dev py-setuptools enchant-dev"
+makedepends="python2-dev python3-dev py-setuptools enchant-dev"
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
build() {
cd "$builddir"
- python2 setup.py build
+ python2 setup.py --quiet build
+ python3 setup.py --quiet build
}
-package() {
+check() {
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ python2 -c "import enchant"
+ python3 -c "import enchant"
}
-check() {
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
cd "$builddir"
- python2 -c "import enchant"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
+
sha512sums="c985714bc8ad69b6580fa1dd546243da5f3f92e8681d846ed265b086c486ae7ed33754fba303b450be4c0cb20e975a9a10efbeb700ea5213a11ed00612a93af0 pyenchant-2.0.0.tar.gz"