diff options
author | AkechiShiro | 2023-05-21 01:23:59 +0200 |
---|---|---|
committer | AkechiShiro | 2023-05-21 01:23:59 +0200 |
commit | 0cc91376a4b19bb8f65f6a1d2b69ec219b5df1b5 (patch) | |
tree | d907fcbc08a2aef76f64a00f0484cf232f8772d4 /PKGBUILD | |
download | aur-python-unblob-native-git.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..75f778bd8d14 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: AkechiShiro <akechishiro-aur at lahfa dot xyz> + +_pyname=unblob-native +pkgname=python-${_pyname}-git +pkgver=v0.1.1 +pkgrel=1 +pkgdesc='Performance critical parts of Unblob' +arch=('x86_64') +url="https://github.com/onekey-sec/$_pyname" +license=(MIT) +depends=(python) +conflicts=() +provides=(python-unblob-native) +makedepends=(git python-pip python-build python-installer python-wheel python-setuptools maturin python-maturin) +checkdepends=(python-pytest python-pytest-cov) +source=("git+https://github.com/onekey-sec/$_pyname") +sha256sums=('SKIP') + + +build() { + cd "$_pyname" + python -m build --wheel --no-isolation +} + +package() { + cd "$_pyname" + python -m installer --destdir="$pkgdir" dist/*.whl +} + +check() { + cd "$_pyname" + local tmp=$(mktemp -d) + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + ls -lah * + python -m installer --destdir="$tmp" dist/${_pyname//-/_}-${pkgver:1}-cp*_$CARCH.whl + PYTHONPATH="$tmp$site_packages" python -m pytest tests + + rmdir --ignore-fail-on-non-empty $tmp +} + |