2019-01-07 10:41:17 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-python-dbusmock
|
|
|
|
#
|
2023-04-12 12:18:07 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-01-07 10:41:17 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-01-07 10:43:03 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-01-07 10:41:17 +00:00
|
|
|
|
2023-04-25 07:57:31 +00:00
|
|
|
|
2019-01-07 10:41:17 +00:00
|
|
|
Name: python-python-dbusmock
|
2021-12-13 04:39:33 +00:00
|
|
|
Version: 0.24.1
|
2019-01-07 10:41:17 +00:00
|
|
|
Release: 0
|
2019-01-10 08:21:10 +00:00
|
|
|
Summary: Python library for creating mock D-Bus objects
|
2019-01-07 10:43:03 +00:00
|
|
|
License: LGPL-3.0-or-later
|
2019-01-07 11:34:25 +00:00
|
|
|
URL: https://github.com/martinpitt/python-dbusmock
|
2019-01-07 10:41:17 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/python-dbusmock/python-dbusmock-%{version}.tar.gz
|
2019-01-07 10:43:03 +00:00
|
|
|
BuildRequires: %{python_module dbus-python}
|
2023-04-12 12:18:07 +00:00
|
|
|
BuildRequires: %{python_module gobject}
|
|
|
|
BuildRequires: %{python_module pip}
|
2020-03-20 14:35:06 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2023-04-12 12:18:07 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-01-07 10:41:17 +00:00
|
|
|
BuildRequires: fdupes
|
2019-01-07 10:43:03 +00:00
|
|
|
BuildRequires: pkgconfig
|
2019-01-07 10:41:17 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
2023-10-11 07:37:01 +00:00
|
|
|
BuildRequires: dbus-1-daemon
|
2019-01-07 10:41:17 +00:00
|
|
|
Requires: dbus-1-x11
|
Accepting request 769868 from home:dimstar:Factory
- Require python-dbus-python: dbusmock can't work without this
module.
without this, you get:
```
> python3
Python 3.7.3 (default, Apr 09 2019, 05:18:21) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbusmock
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/dbusmock/__init__.py", line 16, in <module>
from dbusmock.mockobject import (DBusMockObject, MOCK_IFACE,
File "/usr/lib/python3.7/site-packages/dbusmock/mockobject.py", line 27, in <module>
import dbus
ModuleNotFoundError: No module named 'dbus'
```
OBS-URL: https://build.opensuse.org/request/show/769868
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-dbusmock?expand=0&rev=13
2020-02-04 08:22:34 +00:00
|
|
|
Requires: python-dbus-python
|
2019-01-07 10:41:17 +00:00
|
|
|
Requires: python-gobject
|
|
|
|
Provides: python-dbusmock = %{version}
|
|
|
|
BuildArch: noarch
|
2023-04-12 12:18:07 +00:00
|
|
|
%if %python_version_nodots < 37
|
|
|
|
Requires: python-dataclasses
|
|
|
|
%endif
|
2019-01-07 10:41:17 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-01-10 08:21:10 +00:00
|
|
|
With this program/Python library, one can create mock objects on D-Bus.
|
2019-01-07 10:41:17 +00:00
|
|
|
This is useful for writing tests for software which talks to D-Bus services
|
|
|
|
such as upower, systemd, logind, gnome-session or others, and it is hard
|
|
|
|
(or impossible without root privileges) to set the state of the real services
|
2019-01-10 08:21:10 +00:00
|
|
|
to what one may expect in tests.
|
2019-01-07 10:41:17 +00:00
|
|
|
|
|
|
|
%prep
|
2023-04-12 12:18:07 +00:00
|
|
|
%autosetup -p1 -n python-dbusmock-%{version}
|
2019-01-07 10:41:17 +00:00
|
|
|
|
|
|
|
%build
|
2023-04-12 12:18:07 +00:00
|
|
|
%pyproject_wheel
|
2019-01-07 10:41:17 +00:00
|
|
|
|
|
|
|
%install
|
2023-04-12 12:18:07 +00:00
|
|
|
%pyproject_install
|
2019-01-07 10:41:17 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2020-03-20 14:35:06 +00:00
|
|
|
%pytest
|
2019-01-07 10:41:17 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
2019-01-07 10:43:03 +00:00
|
|
|
%license COPYING
|
|
|
|
%doc NEWS README.rst
|
2023-04-12 12:18:07 +00:00
|
|
|
%{python_sitelib}/dbusmock
|
|
|
|
%{python_sitelib}/python_dbusmock-%{version}*-info
|
2019-01-07 10:41:17 +00:00
|
|
|
|
|
|
|
%changelog
|