diff --git a/audio/py-torchaudio/Makefile b/audio/py-torchaudio/Makefile index 6b82cf039ad3..a9be8c7b4a58 100644 --- a/audio/py-torchaudio/Makefile +++ b/audio/py-torchaudio/Makefile @@ -1,44 +1,44 @@ PORTNAME= torchaudio DISTVERSIONPREFIX= v -DISTVERSION= 2.10.0 -PORTREVISION= 1 +DISTVERSION= 2.11.0 CATEGORIES= audio python # machine-learning MASTER_SITES= https://downloads.sourceforge.net/project/sox/sox/14.4.2/:sox PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTFILES= sox-14.4.2.tar.bz2:sox EXTRACT_ONLY= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}_GH0.tar.gz MAINTAINER= yuri@FreeBSD.org COMMENT= PyTorch-based audio signal processing and machine learning library WWW= https://pytorch.org/audio/stable/index.html \ https://github.com/pytorch/audio LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \ cmake:devel/cmake-core \ ninja:devel/ninja \ pybind11>0:devel/pybind11 LIB_DEPENDS= libabsl_symbolize.so:devel/abseil \ libprotobuf.so:devel/protobuf RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}SoundFile>0:audio/py-SoundFile@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}torchcodec>0:multimedia/py-torchcodec@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}expecttest>0:devel/py-expecttest@${PY_FLAVOR} USES= python USE_PYTHON= pep517 autoplist pytest MAKE_ENV= USE_FFMPEG=0 # ffmpeg integration is broken or unavailable, see https://github.com/pytorch/audio/issues/3716 USE_GITHUB= yes GH_ACCOUNT= pytorch GH_PROJECT= audio TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -# tests as of 2.10.0: 8 failed, 37 passed, 2 skipped, 75 errors in 308.41s (0:05:08) +# tests as of 2.11.0: 592 passed, 4 failed, 473 skipped (segfault in rnnt_pipeline_test upstream issue) .include diff --git a/audio/py-torchaudio/distinfo b/audio/py-torchaudio/distinfo index b8e5a5f1c867..3cf169ed05a6 100644 --- a/audio/py-torchaudio/distinfo +++ b/audio/py-torchaudio/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1769235027 +TIMESTAMP = 1777543942 SHA256 (sox-14.4.2.tar.bz2) = 81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c SIZE (sox-14.4.2.tar.bz2) = 935449 -SHA256 (pytorch-audio-v2.10.0_GH0.tar.gz) = d0d0d9575025eb85150356a0b0de75b553484838006af17a62470b52d59845d1 -SIZE (pytorch-audio-v2.10.0_GH0.tar.gz) = 74300957 +SHA256 (pytorch-audio-v2.11.0_GH0.tar.gz) = 599ec24e7e1eef476ef21f0178e33da00e2434f930ba42e9cc20bf4002220486 +SIZE (pytorch-audio-v2.11.0_GH0.tar.gz) = 74293948 diff --git a/audio/py-torchaudio/files/patch-tools_setup__helpers_extension.py b/audio/py-torchaudio/files/patch-tools_setup__helpers_extension.py new file mode 100644 index 000000000000..f084e0dee37c --- /dev/null +++ b/audio/py-torchaudio/files/patch-tools_setup__helpers_extension.py @@ -0,0 +1,36 @@ +-- Fixes compatibility with newer setuptools versions that require +-- extension sources to be strings instead of Path objects. +-- This is necessary because setuptools.Extension no longer accepts +-- pathlib.Path objects in the sources list. + +--- tools/setup_helpers/extension.py.orig 2026-04-30 10:45:29 UTC ++++ tools/setup_helpers/extension.py +@@ -106,8 +106,8 @@ def get_ext_modules(): + extension( + name="torchaudio.lib._torchaudio", + sources=[ +- _CSRC_DIR / "_torchaudio.cpp", +- _CSRC_DIR / "utils.cpp", ++ str(_CSRC_DIR / "_torchaudio.cpp"), ++ str(_CSRC_DIR / "utils.cpp"), + ], + py_limited_api=True, + extra_compile_args=extra_compile_args, +@@ -115,7 +115,7 @@ def get_ext_modules(): + ), + extension( + name="torchaudio.lib.libtorchaudio", +- sources=[_CSRC_DIR / s for s in sources], ++ sources=[str(_CSRC_DIR / s) for s in sources], + py_limited_api=True, + extra_compile_args=extra_compile_args, + include_dirs=[_CSRC_DIR.parent], +@@ -127,7 +127,7 @@ def get_ext_modules(): + extension( + name="torchaudio.lib.torchaudio_prefixctc", + sources=[ +- _CSRC_DIR / "cuctc" / "src" / s ++ str(_CSRC_DIR / "cuctc" / "src" / s) + for s in ["ctc_prefix_decoder.cpp", "ctc_prefix_decoder_kernel_v2.cu", "python_binding.cpp"] + ], + py_limited_api=True,