summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f2b95374f29dc96c47548d9a9f4ed4bea2aaa82 (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
# Maintainer: Tim Henkes <me+aur@syndace.dev>
# Contributor: Sam Whited <sam@samwhited.com>
# Contributor: Maxime "pep" Buquet <archlinux@bouah.net>

pkgname="python-xeddsa"
pkgver=1.2.0
pkgrel=1
pkgdesc="Python bindings to libxeddsa."
arch=("x86_64" "aarch64")
url="https://github.com/Syndace/python-xeddsa"
license=("MIT")
depends=(
    "glibc"
    "libxeddsa"
    "python"
)
makedepends=(
    "python-build"
    "python-cffi"
    "python-installer"
    "python-setuptools"
    "python-wheel"
)
checkdepends=("python-pytest")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Syndace/python-xeddsa/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=("1880e0432953cb5580cd32fcde8be221f61c6d5d5d821992cb69f82a4cb509fd")

build() {
    cd "${pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

check() {
    cd "${pkgname}-${pkgver}"
    local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
    PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-$python_version" pytest -o addopts=""
}

package() {
    cd "${pkgname}-${pkgver}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}