Compare commits
11 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 3ad66f553d | |||
| f889c009ae | |||
| 66f5a292df | |||
| bb5cc725c4 | |||
| d782f2c495 | |||
| bbce53c3ef | |||
| 561d3d7e1e | |||
| 7c0ae2a56e | |||
| 742ee803e3 | |||
| 5c58eef630 | |||
| 0cb800ac0d |
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 5 15:21:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Add pytest-asyncio dependency and test-aio.patch to fix tests
|
||||||
|
- Skip some misbehaving tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 28 11:44:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to pip-based build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 4 08:27:56 UTC 2022 - pgajdos@suse.com
|
Fri Mar 4 08:27:56 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-i3ipc
|
# spec file for package python-i3ipc
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-i3ipc
|
Name: python-i3ipc
|
||||||
# Before upgrading, verify compatibility with bumblebee-status module title
|
# Before upgrading, verify compatibility with bumblebee-status module title
|
||||||
Version: 2.2.1
|
Version: 2.2.1
|
||||||
@@ -27,12 +25,17 @@ License: BSD-3-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/altdesktop/i3ipc-python
|
URL: https://github.com/altdesktop/i3ipc-python
|
||||||
Source0: https://github.com/altdesktop/i3ipc-python/archive/v%{version}.tar.gz#/i3ipc-%{version}.tar.gz
|
Source0: https://github.com/altdesktop/i3ipc-python/archive/v%{version}.tar.gz#/i3ipc-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE https://github.com/altdesktop/i3ipc-python/issues/217
|
||||||
|
Patch0: test-aio.patch
|
||||||
|
BuildRequires: %{python_module asyncio}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module python-xlib}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
# for tests we need i3 at build time
|
# for tests we need i3 at build time
|
||||||
BuildRequires: %{python_module python-xlib}
|
|
||||||
BuildRequires: %{python_module asyncio}
|
|
||||||
BuildRequires: i3
|
BuildRequires: i3
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: xvfb-run
|
BuildRequires: xvfb-run
|
||||||
@@ -51,7 +54,7 @@ also features a publish/subscribe mechanism for notifying interested parties of
|
|||||||
window manager events.
|
window manager events.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n i3ipc-python-%{version}
|
%autosetup -p1 -n i3ipc-python-%{version}
|
||||||
sed -i "s/'enum-compat'//" setup.py
|
sed -i "s/'enum-compat'//" setup.py
|
||||||
|
|
||||||
# Remove shebang which is not needed (that script cannot be executed
|
# Remove shebang which is not needed (that script cannot be executed
|
||||||
@@ -62,26 +65,29 @@ sed -i '/^#!\/usr\/bin\/env.*/d' examples/*.py examples/i3-focus/*.py
|
|||||||
find examples/ -name \*.py -exec chmod -x '{}' \;
|
find examples/ -name \*.py -exec chmod -x '{}' \;
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
|
||||||
# test_shutdown_event_reconnect always fails
|
# test_shutdown_event_reconnect always fails
|
||||||
# test_restart fails on openSUSE/SLE 15
|
# test_restart fails on openSUSE/SLE 15
|
||||||
# test_window_event is intermittent
|
# test_window_event is intermittent
|
||||||
# test_detailed_window_event stucks in obs, not with the local build (https://github.com/altdesktop/i3ipc-python/issues/192)
|
# test_detailed_window_event stucks in obs, not with the local build (https://github.com/altdesktop/i3ipc-python/issues/192)
|
||||||
|
# test_workspace gets stuck, test_event_exception and test_tick_event get lost in new asyncio loops https://github.com/altdesktop/i3ipc-python/issues/217
|
||||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
xvfb-run --server-args "-screen 0 1920x1080x24" \
|
xvfb-run --server-args "-screen 0 1920x1080x24" \
|
||||||
$python -m pytest -k 'not (test_shutdown_event_reconnect or test_restart or test_window_event or test_detailed_window_event)'
|
$python -m pytest -k 'not (test_shutdown_event_reconnect or test_restart or test_window_event or test_detailed_window_event or test_workspace or test_event_exception or test_tick_event)'
|
||||||
}
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst CHANGELOG.md docs/*.rst
|
%doc README.rst CHANGELOG.md docs/*.rst
|
||||||
%doc examples/
|
%doc examples/
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/i3ipc
|
||||||
|
%{python_sitelib}/i3ipc-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
28
test-aio.patch
Normal file
28
test-aio.patch
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Index: i3ipc-python-2.2.1/test/aio/ipctest.py
|
||||||
|
===================================================================
|
||||||
|
--- i3ipc-python-2.2.1.orig/test/aio/ipctest.py
|
||||||
|
+++ i3ipc-python-2.2.1/test/aio/ipctest.py
|
||||||
|
@@ -1,5 +1,9 @@
|
||||||
|
from subprocess import Popen
|
||||||
|
import pytest
|
||||||
|
+try:
|
||||||
|
+ from pytest_asyncio import fixture
|
||||||
|
+except ImportError:
|
||||||
|
+ from pytest import fixture
|
||||||
|
|
||||||
|
from i3ipc.aio import Connection
|
||||||
|
from i3ipc import CommandReply
|
||||||
|
@@ -15,11 +19,11 @@ class IpcTest:
|
||||||
|
timeout_thread = None
|
||||||
|
i3_conn = None
|
||||||
|
|
||||||
|
- @pytest.fixture(scope='class')
|
||||||
|
+ @fixture(scope='class')
|
||||||
|
def event_loop(self):
|
||||||
|
return asyncio.get_event_loop()
|
||||||
|
|
||||||
|
- @pytest.fixture(scope='class')
|
||||||
|
+ @fixture(scope='class')
|
||||||
|
async def i3(self):
|
||||||
|
process = Popen(['i3', '-c', 'test/i3.config'])
|
||||||
|
# wait for i3 to start up
|
||||||
Reference in New Issue
Block a user