2021-06-04 15:24:22 +00:00
|
|
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
|
|
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
|
|
|
|
pkgname=py-idna
|
|
|
|
_pkgname=idna
|
|
|
|
pkgver=2.9
|
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="IDNA 2008 and UTS #46 for Python"
|
|
|
|
url="https://github.com/kjd/idna"
|
|
|
|
arch="noarch"
|
|
|
|
license="BSD"
|
|
|
|
depends=""
|
|
|
|
makedepends="python2-dev python3-dev py-setuptools"
|
|
|
|
subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
|
|
|
|
source="idna-$pkgver.tar.gz::https://github.com/kjd/idna/archive/v$pkgver.tar.gz"
|
|
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$builddir"
|
|
|
|
python2 setup.py build || return 1
|
|
|
|
python3 setup.py build || return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p "$pkgdir"
|
|
|
|
}
|
|
|
|
|
|
|
|
_py() {
|
|
|
|
local python="$1"
|
|
|
|
pkgdesc="$pkgdesc (for $python)"
|
|
|
|
depends="$depends $python"
|
|
|
|
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
|
|
|
|
|
|
|
cd "$builddir"
|
2023-01-12 18:48:03 +00:00
|
|
|
$python3 setup.py install --prefix=/usr --root="$subpkgdir"
|
2021-06-04 15:24:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_py2() {
|
|
|
|
replaces="$pkgname"
|
|
|
|
_py python2
|
|
|
|
}
|
|
|
|
|
|
|
|
_py3() {
|
|
|
|
_py python3
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sha512sums="af15fefeaf3b4d90b2edf83a1ac15ffd0290678f43d734d27477d2a4866b01d4042558ddd26a3c80f6035f36d4760618708c5a86bf4f5b420fcbf203de4b82b1 idna-2.9.tar.gz"
|