diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2018-02-12 10:56:12 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2018-02-12 10:56:57 +0000 |
commit | c827338e71571bf622e5a1b884aed1edea2cf66d (patch) | |
tree | c77ae21bd7434894ff9a808d600bdfd745037afe /community/py-idna-ssl/APKBUILD | |
parent | 7ebb5145a732879b4a7a3135378ead8b34e0fef9 (diff) | |
download | aports-c827338e71571bf622e5a1b884aed1edea2cf66d.tar.bz2 aports-c827338e71571bf622e5a1b884aed1edea2cf66d.tar.xz |
community/py-idna-ssl: new aport, new dependency of py3-aiohttp
Diffstat (limited to 'community/py-idna-ssl/APKBUILD')
-rw-r--r-- | community/py-idna-ssl/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/community/py-idna-ssl/APKBUILD b/community/py-idna-ssl/APKBUILD new file mode 100644 index 0000000000..eb77ff6357 --- /dev/null +++ b/community/py-idna-ssl/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-idna-ssl +_pkgname=${pkgname/py-/} +pkgver=1.0.0 +pkgrel=0 +pkgdesc="Patch ssl.match_hostname for Unicode(idna) domains support" +url=" https://github.com/aio-libs/idna_ssl" +arch="all" +license="MIT" +depends="py-idna" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/aio-libs/$_pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + + +sha512sums="50ddc71777d596f677ac2f29d8df9553a64e9e71c0e50ae240876c90e0dcb3aa1f0a806d493c188dfe6871c1baeefe4b4cf8a654a0918cb57e1727a1a9ddbf32 py-idna-ssl-1.0.0.tar.gz" |