aboutsummaryrefslogblamecommitdiffstats
path: root/community/py-idna-ssl/APKBUILD
blob: 66ce589c795849705983fff6ec6a158546ce3e68 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                           
            


                                                                    
             










































                                                                                               
                                                                                                                                                                       
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-idna-ssl
_pkgname=${pkgname/py-/}
pkgver=1.1.0
pkgrel=0
pkgdesc="Patch ssl.match_hostname for Unicode(idna) domains support"
url=" https://github.com/aio-libs/idna_ssl"
arch="noarch"
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="01e58e9f32f7e02ef203edbd76e199916ea0b16d01a929ca2fb272d83988483c17e9c36e131f47bfba7f7b657bef9e2be222f81800716a5b87d5847c27cce34d  py-idna-ssl-1.1.0.tar.gz"