Accepting request 1224214 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1224214
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-dbusmock?expand=0&rev=14
This commit is contained in:
Ana Guerrero 2024-11-17 15:39:36 +00:00 committed by Git OBS Bridge
commit c0faf54bcb
3 changed files with 34 additions and 4 deletions

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 14 13:49:18 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Split test suite off into a 2nd flavor (:test) to avoid
buildcycle polkit -> upower -> python-dbusmock
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 28 08:44:27 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org> Mon Oct 28 08:44:27 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -16,7 +16,15 @@
# #
Name: python-python-dbusmock %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-python-dbusmock%{psuffix}
Version: 0.32.1 Version: 0.32.1
Release: 0 Release: 0
Summary: Python library for creating mock D-Bus objects Summary: Python library for creating mock D-Bus objects
@ -26,14 +34,20 @@ Source: https://files.pythonhosted.org/packages/source/p/python-dbusmock
BuildRequires: %{python_module dbus-python} BuildRequires: %{python_module dbus-python}
BuildRequires: %{python_module gobject} BuildRequires: %{python_module gobject}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: dbus-1-daemon
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: upower
BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gobject-introspection-1.0)
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dbusmock = %{version}}
BuildRequires: dbus-1-daemon
BuildRequires: upower
%endif
#/ SECTION
Requires: /usr/bin/dbus-daemon Requires: /usr/bin/dbus-daemon
Requires: python-dbus-python Requires: python-dbus-python
Requires: python-gobject Requires: python-gobject
@ -58,16 +72,22 @@ to what one may expect in tests.
%pyproject_wheel %pyproject_wheel
%install %install
%if !%{with test}
%pyproject_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check %check
%if %{with test}
%pytest %pytest
%endif
%if !%{with test}
%files %{python_files} %files %{python_files}
%license COPYING %license COPYING
%doc NEWS README.md %doc NEWS README.md
%{python_sitelib}/dbusmock %{python_sitelib}/dbusmock
%{python_sitelib}/python_dbusmock-%{version}*-info %{python_sitelib}/python_dbusmock-%{version}*-info
%endif
%changelog %changelog