summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorButui Hu2022-10-21 10:18:45 +0800
committerButui Hu2022-10-21 10:18:45 +0800
commit8c4390ad7c6e5d947a3ea4bfe69038006cf32b3a (patch)
tree45c8c0100b6288093d9e45896f65e7d8e827e53c /PKGBUILD
downloadaur-8c4390ad7c6e5d947a3ea4bfe69038006cf32b3a.tar.gz
first commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..87bb969136c7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Butui Hu <hot123tea123@gmail.com>
+
+_pkgname=ttach
+pkgname=python-ttach
+pkgver=0.0.3
+pkgrel=1
+pkgdesc='Image Test Time Augmentation with PyTorch'
+arch=('any')
+url='https://github.com/qubvel/ttach'
+license=('MIT')
+depends=(
+ python-pytorch
+)
+checkdepends=(
+ python-pytest
+)
+makedepends=(
+ python-build
+ python-installer
+ python-setuptools
+ python-wheel
+)
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/qubvel/ttach/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('84c0dc442a560521b5321695926d28ce3353be3af609c607ab1cbb68cb78bfcbf5e5cebbc885c26acfefb488a12d7fcb499e1a41fda957b0f5f9f1754f557d37')
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "${_pkgname}-${pkgver}"
+ PYTHONPATH=${PWD}/build/lib pytest -v
+}
+
+package() {
+ cd "${_pkgname}-${pkgver}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+# vim:set ts=2 sw=2 et: