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-platformdirs.changes b/python-platformdirs.changes
index 84759de..9e0ec60 100644
--- a/python-platformdirs.changes
+++ b/python-platformdirs.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Wed Feb 5 12:15:54 UTC 2025 - Daniel Garcia
+
+- Use multibuild for test package
+
-------------------------------------------------------------------
Wed Nov 20 16:12:13 UTC 2024 - Dirk Müller
diff --git a/python-platformdirs.spec b/python-platformdirs.spec
index b15a583..7e3d276 100644
--- a/python-platformdirs.spec
+++ b/python-platformdirs.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-platformdirs
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,22 +16,33 @@
#
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
%{?sle15_python_module_pythons}
-Name: python-platformdirs
+Name: python-platformdirs%{psuffix}
Version: 4.3.6
Release: 0
Summary: Module for determining appropriate platform-specific dirs
License: MIT
URL: https://github.com/platformdirs/platformdirs
Source: https://files.pythonhosted.org/packages/source/p/platformdirs/platformdirs-%{version}.tar.gz
-BuildRequires: %{python_module appdirs == 1.4.4}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module hatch-vcs}
BuildRequires: %{python_module hatchling >= 0.22.0}
BuildRequires: %{python_module pip}
+%if %{with test}
+BuildRequires: %{python_module appdirs == 1.4.4}
+BuildRequires: %{python_module platformdirs = %{version}}
BuildRequires: %{python_module pytest >= 7.4}
BuildRequires: %{python_module pytest-cov >= 4.1}
BuildRequires: %{python_module pytest-mock >= 3.11.1}
+%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -44,19 +55,27 @@ A small Python module for determining appropriate platform-specific dirs, e.g. a
%autosetup -p1 -n platformdirs-%{version}
%build
+%if !%{with test}
%pyproject_wheel
+%endif
%install
+%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%endif
%check
+%if %{with test}
%pytest
+%endif
+%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/platformdirs
%{python_sitelib}/platformdirs-%{version}.dist-info
+%endif
%changelog