diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..fcc7b97
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,3 @@
+
+ test
+
diff --git a/python-librosa.changes b/python-librosa.changes
index 9629ea5..b0418f7 100644
--- a/python-librosa.changes
+++ b/python-librosa.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Wed Jan 28 09:32:05 UTC 2026 - Daniel Garcia
+
+- Add multibuild for tests
+
-------------------------------------------------------------------
Wed Jan 28 08:09:20 UTC 2026 - Daniel Garcia
diff --git a/python-librosa.spec b/python-librosa.spec
index a42359e..3c941f2 100644
--- a/python-librosa.spec
+++ b/python-librosa.spec
@@ -16,8 +16,17 @@
#
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == ""
+%define psuffix %{nil}
+%bcond_with test
+%else
+%bcond_without test
+%define psuffix -%{flavor}
+%endif
+
%define static_test_data_commit 72bd79e448829187f6336818b3f6bdc2c2ae8f5a
-Name: python-librosa
+Name: python-librosa%{psuffix}
Version: 0.11.0
Release: 0
Summary: Python module for audio and music processing
@@ -68,8 +77,10 @@ Requires: python-scipy >= 1.2.0
Requires: python-soxr >= 0.3.2
Requires: python-typing_extensions >= 4.1.1
BuildArch: noarch
+%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module matplotlib >= 3.3.0}
+BuildRequires: %{python_module librosa = %{version}}
BuildRequires: %{python_module packaging >= 20.0}
BuildRequires: %{python_module pytest-mpl}
BuildRequires: %{python_module pytest-xdist}
@@ -78,6 +89,7 @@ BuildRequires: %{python_module resampy >= 0.2.2}
BuildRequires: %{python_module samplerate}
BuildRequires: ffmpeg-4
# /SECTION
+%endif
%python_subpackages
%description
@@ -96,12 +108,17 @@ find librosa -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
sed -i '/addopts/ s/--cov-report.*--cov-report=xml//' setup.cfg
%build
+%if !%{with test}
%pyproject_wheel
+%endif
%install
+%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
+%if %{with test}
%check
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" $python %{SOURCE20}
@@ -155,13 +172,17 @@ donttest+=" or test_beat"
donttest+=" or test_nnls_multiblock"
#
donttest+=" or test_subsegment_badn"
-%pytest -p no:warnings -k "not (${donttest} or ${notparallel} or network)" -n auto
-%pytest -p no:warnings -k "not (${donttest} or network) and (${notparallel})"
+%pytest -k "not (${donttest} or ${notparallel} or network)" -n auto
+%pytest -k "not (${donttest} or network) and (${notparallel})"
+%endif
+
+%if !%{with test}
%files %{python_files}
%doc AUTHORS.md README.md
%license LICENSE.md
%{python_sitelib}/librosa
%{python_sitelib}/librosa-%{version}.dist-info
+%endif
%changelog