# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-aiosmtpd
_pkgname=aiosmtpd
pkgver=1.1
pkgrel=0
pkgdesc="A reimplementation of the Python stdlib smtpd.py based on asyncio"
url="https://github.com/aio-libs/aiosmtpd"
arch="noarch"
license="Apache-2.0"
depends="py-atpublic"
subpackages="py3-${pkgname#py-}:_py3"
makedepends="python3-dev py-setuptools pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
cd "$builddir"
python3 setup.py build
}
check() {
cd "$builddir"
pytest-3
}
package() {
mkdir -p "$pkgdir"
}
_py3() {
cd "$builddir"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="b61df616f2e14d1da67ac05149543bf48b14a31d44437d9a1dd11b166b98b56220c00e7c55e18d4fd99872d724e23f272922dd3548150632a189d9cb9b652883 aiosmtpd-1.1.tar.gz"