# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-enchant _pkgname=pyenchant pkgver=2.0.0 pkgrel=1 pkgdesc="A spellchecking library for Python" url="https://github.com/rfk/pyenchant" arch="noarch" license="LGPL-2.0-or-later" depends="enchant" depends_dev="" makedepends="python2-dev python3-dev py-setuptools enchant-dev" install="" 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 --quiet build python3 setup.py --quiet build } check() { cd "$builddir" python2 -c "import enchant" python3 -c "import enchant" } 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" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="c985714bc8ad69b6580fa1dd546243da5f3f92e8681d846ed265b086c486ae7ed33754fba303b450be4c0cb20e975a9a10efbeb700ea5213a11ed00612a93af0 pyenchant-2.0.0.tar.gz"