diff options
author | chengscott | 2024-03-23 15:51:11 +0800 |
---|---|---|
committer | chengscott | 2024-03-23 15:51:11 +0800 |
commit | 27b1f834e22ace584e9c6a95009a1c8eebc9ead3 (patch) | |
tree | 9e76cb4245b6f75a2745947bbb23e11086d452c2 | |
download | aur-27b1f834e22ace584e9c6a95009a1c8eebc9ead3.tar.gz |
init
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..11e466cf1f39 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = python-aitemplate-git + pkgdesc = AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code. + pkgver = 0.3.dev0.r653.gd2dc957b + pkgrel = 1 + url = https://github.com/facebookincubator/AITemplate + arch = any + license = Apache + makedepends = git + makedepends = ninja + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + depends = python-jinja + depends = python-numpy + depends = python-sympy + provides = python-aitemplate + conflicts = python-aitemplate + source = python-aitemplate-git::git+https://github.com/facebookincubator/AITemplate + sha256sums = SKIP + +pkgname = python-aitemplate-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..16ccb60131fd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Scott Cheng <aur@chengscott.io> +pkgname=python-aitemplate-git +_name="${pkgname%%-git}" +pkgver=0.3.dev0.r653.gd2dc957b +pkgrel=1 +pkgdesc='AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code.' +arch=(any) +provides=("${_name}") +conflicts=("${_name}") +url='https://github.com/facebookincubator/AITemplate' +license=('Apache') +depends=( + python-jinja + python-numpy + python-sympy +) +makedepends=( + git + ninja + python-build + python-installer + python-wheel +) +source=("${pkgname}"::"git+${url}") +sha256sums=('SKIP') + +pkgver() { + cd "${pkgname}" + git describe --tags | + python -c "import sys; \ + v0, v1, v2, v3 = sys.stdin.read().replace('.', '-').split('-'); \ + print(f'{v0}.{int(v1)+1}.dev0.r{v2}.{v3}', end='')" +} + +prepare() { + cd "${pkgname}" + git clean -dfx + git submodule update --init --recursive +} + +build() { + python -m build -nw "${pkgname}/python" +} + +package() { + python -m installer \ + --compile-bytecode 1 \ + --destdir "${pkgdir}" \ + "${pkgname}/python/dist/${_name#python-}-"*.whl + install -Dm644 "${pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${_name}" +} |