summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Fan2024-03-05 23:14:28 +0800
committerYujun Fan2024-03-05 23:14:28 +0800
commit541b1fd0e521306244b343bcee07c590409281d3 (patch)
tree4a17e5fb824c2b146d9872330d5b3f105cda0d0b
parent7e64553864f522e92efb4ae0a1f97674fefcba2e (diff)
downloadaur-541b1fd0e521.tar.gz
modified build issue and source url
-rw-r--r--PKGBUILD14
1 files changed, 8 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f21253f1aae3..398e08e51d3d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,9 @@
# Contributor:
pkgname="python-thop"
-pkgver=1.0.0
-pkgrel=3
+_pkgname="pytorch-OpCounter"
+pkgver=0.1.1
+pkgrel=5
pkgdesc='Count the MACs / FLOPs of your PyTorch model.'
arch=(any)
url="https://github.com/Lyken17/pytorch-OpCounter"
@@ -11,17 +12,18 @@ license=(MIT)
depends=(python python-pytorch)
conflicts=()
makedepends=(python-build python-installer python-setuptools python-wheel)
-source=(pytorch-OpCounter-master.zip::"$url/archive/refs/heads/master.zip")
-sha256sums=('9dd5999570452100f8082c360ab3d9cbf9bcad22b7fb87ed8bcfff20dbc02433')
+source=("git+$url#commit=43c064a")
+sha256sums=('SKIP')
build() {
- cd "${srcdir}/pytorch-OpCounter-master"
+ cd "${srcdir}/${_pkgname}"
+ sed -i '21d' setup.py
python -m build --wheel --skip-dependency-check --no-isolation
}
package(){
depends+=()
- cd "${srcdir}/pytorch-OpCounter-master"
+ cd "${srcdir}/${_pkgname}"
PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}