Blob Blame History Raw
%global pypi_name dbus-next
%global srcname   dbus_next

%bcond_without  tests

Name:           python-%{pypi_name}
Version:        0.2.3
Release:        5%{?dist}
Summary:        Zero-dependency DBus library for Python with asyncio support

License:        MIT
# pypi_source archive does not include test data
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
%if %{with tests}
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(pytest-asyncio)
BuildRequires:  python3dist(pytest-timeout)
BuildRequires:  /usr/bin/dbus-run-session

%global _description %{expand:
python-dbus-next is a Python library for DBus that aims to be a fully
featured high level library primarily geared towards integration of
applications into Linux desktop and mobile environments.

Desktop application developers can use this library for integrating their
applications into desktop environments by implementing common DBus
standard interfaces or creating custom plugin interfaces.

Desktop users can use this library to create their own scripts and
utilities to interact with those interfaces for customization of their
desktop environment.

python-dbus-next plans to improve over other DBus libraries for Python in
the following ways:

 -  Zero dependencies and pure Python 3.
 -  Support for multiple IO backends including asyncio and the GLib main
 -  Nonblocking IO suitable for GUI development.
 -  Target the latest language features of Python for beautiful services
    and clients.
 -  Complete implementation of the DBus type system without ever guessing
 -  Integration tests for all features of the library.
 -  Completely documented public API.}

%description %{_description}

%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name} %{_description}

# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# Fix permissions for examples
chmod -x examples/*.py



%if %{with tests}
# tests require dbus daemon to be running
%global __pytest  /usr/bin/dbus-run-session -- %{__pytest}
# test_tcp_connection_with_forwarding is broken by dbus 1.14.4
# altdesktop/python-dbus-next#135
%pytest -k 'not test_tcp_connection_with_forwarding'


%files -n python3-%{pypi_name}
%license LICENSE
%doc examples/

* Mon Jan 23 2023 Aleksei Bavshin <> - 0.2.3-5
- Skip failing test

* Fri Jan 20 2023 Fedora Release Engineering <> - 0.2.3-5
- Rebuilt for

* Fri Jul 22 2022 Fedora Release Engineering <> - 0.2.3-4
- Rebuilt for

* Mon Jun 13 2022 Python Maint <> - 0.2.3-3
- Rebuilt for Python 3.11

* Fri Jan 21 2022 Fedora Release Engineering <> - 0.2.3-2
- Rebuilt for

* Sun Jul 25 2021 Aleksei Bavshin <> - 0.2.3-1
- Update to 0.2.3

* Fri Jul 23 2021 Fedora Release Engineering <> - 0.2.2-3
- Rebuilt for

* Fri Jun 04 2021 Python Maint <> - 0.2.2-2
- Rebuilt for Python 3.10

* Mon Mar 01 2021 Aleksei Bavshin <> - 0.2.2-1
- Initial import (#1929001)