diff options
author | Yujun Fan | 2024-03-05 23:14:28 +0800 |
---|---|---|
committer | Yujun Fan | 2024-03-05 23:14:28 +0800 |
commit | 541b1fd0e521306244b343bcee07c590409281d3 (patch) | |
tree | 4a17e5fb824c2b146d9872330d5b3f105cda0d0b | |
parent | 7e64553864f522e92efb4ae0a1f97674fefcba2e (diff) | |
download | aur-541b1fd0e521.tar.gz |
modified build issue and source url
-rw-r--r-- | PKGBUILD | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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/" } |