summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb2f6a07d7f0777473274f9515d8830aa15d1486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Tomas Krizek <tomas.krizek@nic.cz>

pkgname=python-dnspython-git
_pkgname=dnspython
pkgver=v2.0.0.r195.674cdfc
pkgrel=1
pkgdesc="A DNS toolkit for Python"
arch=('any')
url="http://www.dnspython.org"
license=('ISC')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
makedepends=(
    'python-setuptools'
    'python-pytest'
    # 'cython'  # uncomment dep & build option for cython optimization speedup
)
checkdepends=('python-idna' 'python-cryptography' 'python-trio')
depends=('python')
optdepends=(
    'python-idna: support for update IDNA 2008'
    'python-cryptography: DNSSEC support'
    'python-requests: DNS-over-HTTPS support'
    'python-requests-toolbelt: DNS-over-HTTPS support'
    'python-trio: async I/O backend'
    'python-curio: async I/O backend'
    'python-sniffio: async I/O'
)
source=("${_pkgname}::git+https://github.com/rthalley/${_pkgname}.git")
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
    cd "${srcdir}/${_pkgname}"

    python setup.py build  # --cython-compile
}

check() {
    cd "${srcdir}/${_pkgname}"

    python setup.py test
}

package() {
    cd "${srcdir}/${_pkgname}"

    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}