2019-10-21 07:36:46 +00:00
|
|
|
|
#
|
|
|
|
|
|
# spec file for package python-i3ipc
|
|
|
|
|
|
#
|
2022-03-04 10:04:49 +00:00
|
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-10-21 07:36:46 +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.
|
|
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-31 11:14:49 +00:00
|
|
|
|
%define skip_python2 1
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-10-21 07:36:46 +00:00
|
|
|
|
Name: python-i3ipc
|
|
|
|
|
|
# Before upgrading, verify compatibility with bumblebee-status module title
|
2020-04-06 08:01:24 +00:00
|
|
|
|
Version: 2.2.1
|
2019-10-21 07:36:46 +00:00
|
|
|
|
Release: 0
|
|
|
|
|
|
Summary: Python library for i3 WM extensions
|
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
|
URL: https://github.com/altdesktop/i3ipc-python
|
|
|
|
|
|
Source0: https://github.com/altdesktop/i3ipc-python/archive/v%{version}.tar.gz#/i3ipc-%{version}.tar.gz
|
2020-03-31 10:43:21 +00:00
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-10-21 07:36:46 +00:00
|
|
|
|
BuildRequires: fdupes
|
2020-03-31 11:14:49 +00:00
|
|
|
|
# for tests we need i3 at build time
|
|
|
|
|
|
BuildRequires: %{python_module python-xlib}
|
2021-09-23 09:48:15 +00:00
|
|
|
|
BuildRequires: %{python_module asyncio}
|
2020-03-31 10:43:21 +00:00
|
|
|
|
BuildRequires: i3
|
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
|
BuildRequires: xvfb-run
|
2021-03-08 08:17:25 +00:00
|
|
|
|
Requires: python-python-xlib
|
2019-10-21 07:36:46 +00:00
|
|
|
|
BuildArch: noarch
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%python_subpackages
|
2019-10-21 07:36:46 +00:00
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
python-i3ipc is a Python library for controlling the i3 window manager which
|
|
|
|
|
|
aims to be used by scripts and applications which interact with the window
|
|
|
|
|
|
manager like status line generators, notification daemons and pagers.
|
|
|
|
|
|
|
|
|
|
|
|
This library uses i3’s interprocess communication, which is the interface
|
|
|
|
|
|
that i3 WM uses to receive commands from client applications such as i3-msg. It
|
|
|
|
|
|
also features a publish/subscribe mechanism for notifying interested parties of
|
|
|
|
|
|
window manager events.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
%setup -q -n i3ipc-python-%{version}
|
2020-03-31 10:43:21 +00:00
|
|
|
|
sed -i "s/'enum-compat'//" setup.py
|
|
|
|
|
|
|
|
|
|
|
|
# Remove shebang which is not needed (that script cannot be executed
|
|
|
|
|
|
# standalone).
|
2020-04-06 08:01:24 +00:00
|
|
|
|
sed -i '/^#!\/usr\/bin\/env.*/d' examples/*.py examples/i3-focus/*.py
|
2019-10-21 07:36:46 +00:00
|
|
|
|
|
2021-09-23 09:48:15 +00:00
|
|
|
|
# Examples shouldn't be executable
|
|
|
|
|
|
find examples/ -name \*.py -exec chmod -x '{}' \;
|
|
|
|
|
|
|
2019-10-21 07:36:46 +00:00
|
|
|
|
%build
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%python_build
|
2019-10-21 07:36:46 +00:00
|
|
|
|
|
|
|
|
|
|
%install
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%python_install
|
2019-10-21 07:36:46 +00:00
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%check
|
|
|
|
|
|
# test_shutdown_event_reconnect always fails
|
|
|
|
|
|
# test_restart fails on openSUSE/SLE 15
|
|
|
|
|
|
# test_window_event is intermittent
|
2022-03-04 10:04:49 +00:00
|
|
|
|
# test_detailed_window_event stucks in obs, not with the local build (https://github.com/altdesktop/i3ipc-python/issues/192)
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
|
|
|
|
|
xvfb-run --server-args "-screen 0 1920x1080x24" \
|
2022-03-04 10:04:49 +00:00
|
|
|
|
$python -m pytest -k 'not (test_shutdown_event_reconnect or test_restart or test_window_event or test_detailed_window_event)'
|
2020-03-31 10:43:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2019-10-21 07:36:46 +00:00
|
|
|
|
%license LICENSE
|
|
|
|
|
|
%doc README.rst CHANGELOG.md docs/*.rst
|
|
|
|
|
|
%doc examples/
|
2020-03-31 10:43:21 +00:00
|
|
|
|
%{python_sitelib}/*
|
2019-10-21 07:36:46 +00:00
|
|
|
|
|
|
|
|
|
|
%changelog
|