From 5f2c73d767af2a6f1f988b5958d84fa1e0c1f7ac Mon Sep 17 00:00:00 2001 From: Keith Maxwell Date: Sun, 12 Aug 2018 14:04:25 +0100 Subject: testing/py-enchant: add a py3- subpackage --- testing/py-enchant/APKBUILD | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'testing/py-enchant') 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" -- cgit v1.2.3