From d62f4e1ae5d88e6d3d4923b1da011796c1fba9e9 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Mon, 2 May 2022 23:49:32 +0800 Subject: [PATCH] Update to 0.11.0 with various fixes * Backport a build fix from upstream 0.11 branch * Fix namcap warnings * python-torchaudio W: Dependency included and not needed ('sox') torchaudio uses bundled sox, so the system sox is not used [1]. * python-torchaudio E: ELF file ('usr/lib/python3.10/site-packages/torchaudio/_torchaudio.so') found in an 'any' package. * python-torchaudio E: ELF file ('usr/lib/python3.10/site-packages/torchaudio/lib/libtorchaudio.so') found in an 'any' package. * Fix the version reported by `pip show torchaudio`. It was something like 0.10.1+4b64f80 [1] https://github.com/pytorch/audio/blob/v0.11.0/third_party/sox/CMakeLists.txt --- PKGBUILD | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index a75e325..d0f298f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,19 +3,28 @@ pkgname=python-torchaudio _pkgname=audio -pkgver=0.10.1 +pkgver=0.11.0 pkgrel=1 pkgdesc="Data manipulation and transformation for audio signal processing, powered by PyTorch" -arch=('any') +arch=('x86_64' 'i686') url="https://github.com/pytorch/audio" license=('BSD') -depends=('python' 'sox' 'python-pytorch') +depends=('python' 'python-pytorch') optdepends=('python-kaldi-io') makedepends=('git' 'python-setuptools' 'cmake' 'ninja') conflicts=('python-torchaudio-git') source=("git+$url#tag=v${pkgver}") sha512sums=('SKIP') +export BUILD_VERSION=$pkgver + +prepare() { + cd "$srcdir/${_pkgname}" + # Use sourceforge url to fetch zlib + # See https://github.com/pytorch/audio/pull/2297 + git cherry-pick -n e92a17c35fdff6b0622b0791b43e665c5d05c4b4 +} + build() { cd "$srcdir/${_pkgname}" CUDA_HOME=/opt/cuda/ BUILD_SOX=1 python setup.py build -- 2.36.0