diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 40 |
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9617587c17e1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = python-unblob-native-git + pkgdesc = Performance critical parts of Unblob + pkgver = v0.1.1 + pkgrel = 1 + url = https://github.com/onekey-sec/unblob-native + arch = x86_64 + license = MIT + checkdepends = python-pytest + checkdepends = python-pytest-cov + makedepends = git + makedepends = python-pip + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + makedepends = python-setuptools + makedepends = maturin + makedepends = python-maturin + depends = python + provides = python-unblob-native + source = git+https://github.com/onekey-sec/unblob-native + sha256sums = SKIP + +pkgname = python-unblob-native-git 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 +} + |