git » python-dnspython.git » main » tree

[main] / PKGBUILD

# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Mathijs Kadijk <maccain13@gmail.com>

_name=dnspython
pkgname=python-dnspython
pkgver=2.5.0
pkgrel=2
epoch=1
pkgdesc="A DNS toolkit for Python"
arch=('any')
url="http://www.dnspython.org"
license=('custom:ISC')
depends=('python')
makedepends=('python-build' 'python-installer'
             'python-wheel' 'python-hatchling')
#checkdepends=('python-idna' 'python-cryptography' 'python-trio' 'python-pytest')
optdepends=('python-cryptography: DNSSEC support'
            'python-requests-toolbelt: DoH support'
            'python-idna: support for updated IDNA 2008'
            'python-curio: async support'
            'python-trio: async support'
            'python-sniffio: async support')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('a0034815a59ba9ae888946be7ccca8f7c157b286f8455b379c692efb51022a15')
validpgpkeys=('A580DEE052FEC78D8ACF383DF24B3AFC8CA2F5C7') # Bob Halley <halley@dnspython.org>

prepare() {
    cd dnspython-${pkgver}
}

build() {
    cd dnspython-${pkgver}

    python -m build --wheel --no-isolation
}

#check() {
#    cd dnspython-${pkgver}

    # https://github.com/rthalley/dnspython/issues/622
#    pytest -k 'not test_unpickle'
#}

package() {
    cd dnspython-${pkgver}

    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}