forked from pool/python-wmctrl
Accepting request 888091 from home:jayvdb:branches:devel:languages:python
- Remove pr_3.patch and LICENSE which were merged upstream - Deselect two tests that fail - Update to v0.4 * See https://github.com/antocuni/wmctrl/compare/v0.3...v0.4 OBS-URL: https://build.opensuse.org/request/show/888091 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wmctrl?expand=0&rev=4
This commit is contained in:
21
LICENSE
21
LICENSE
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2008-2020 Antonio Cuni
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
48
pr_3.patch
48
pr_3.patch
@@ -1,48 +0,0 @@
|
||||
From c92ac1ea187c9a407156705bd1b0de8afd2530e1 Mon Sep 17 00:00:00 2001
|
||||
From: John Vandenberg <jayvdb@gmail.com>
|
||||
Date: Mon, 26 Oct 2020 13:05:53 +0700
|
||||
Subject: [PATCH] Python 3 support
|
||||
|
||||
Fixes https://github.com/antocuni/wmctrl/issues/2
|
||||
---
|
||||
wmctrl.py | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: wmctrl-0.3/wmctrl.py
|
||||
===================================================================
|
||||
--- wmctrl-0.3.orig/wmctrl.py
|
||||
+++ wmctrl-0.3/wmctrl.py
|
||||
@@ -1,5 +1,10 @@
|
||||
import os
|
||||
-from commands import getoutput
|
||||
+
|
||||
+try:
|
||||
+ from commands import getoutput
|
||||
+except ImportError:
|
||||
+ from subprocess import getoutput
|
||||
+
|
||||
try:
|
||||
from collections import namedtuple
|
||||
except ImportError:
|
||||
@@ -15,8 +20,8 @@ class Window(BaseWindow):
|
||||
windows = []
|
||||
for line in out.splitlines():
|
||||
parts = line.split(None, len(Window._fields)-2)
|
||||
- parts = map(str.strip, parts)
|
||||
- parts[1:7] = map(int, parts[1:7])
|
||||
+ parts = list(map(str.strip, parts))
|
||||
+ parts[1:7] = list(map(int, parts[1:7]))
|
||||
parts.append(_wm_window_role(parts[0]))
|
||||
windows.append(cls(*parts))
|
||||
return windows
|
||||
@@ -68,8 +73,8 @@ class Window(BaseWindow):
|
||||
|
||||
def set_geometry(self, geometry):
|
||||
dim, pos = geometry.split('+', 1)
|
||||
- w, h = map(int, dim.split('x'))
|
||||
- x, y = map(int, pos.split('+'))
|
||||
+ w, h = list(map(int, dim.split('x')))
|
||||
+ x, y = list(map(int, pos.split('+')))
|
||||
self.resize_and_move(x, y, w, h)
|
||||
|
||||
def set_properties(self,properties):
|
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 23 18:59:14 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Remove pr_3.patch and LICENSE which were merged upstream
|
||||
- Deselect two tests that fail
|
||||
- Update to v0.4
|
||||
* See https://github.com/antocuni/wmctrl/compare/v0.3...v0.4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 12:57:46 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-wmctrl
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-wmctrl
|
||||
Version: 0.3
|
||||
Version: 0.4
|
||||
Release: 0
|
||||
Summary: Python programmatic control of X windows
|
||||
# Project is in the process of transitioning from Bitbucket to GitHub
|
||||
@@ -26,9 +26,6 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/antocuni/wmctrl
|
||||
Source: https://files.pythonhosted.org/packages/source/w/wmctrl/wmctrl-%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/antocuni/wmctrl/master/LICENSE
|
||||
# Backport ofhttps://github.com/antocuni/wmctrl/pull/3
|
||||
Patch0: pr_3.patch
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -49,8 +46,6 @@ Python tool to programmatically control windows inside X.
|
||||
|
||||
%prep
|
||||
%setup -q -n wmctrl-%{version}
|
||||
%patch0 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -66,7 +61,7 @@ cat > /tmp/test_script.sh <<EOF
|
||||
openbox &
|
||||
sleep 5
|
||||
wmctrl -l -G -p -x
|
||||
$python -m pytest -k 'not test_activate' test/test_wmctrl.py
|
||||
$python -m pytest -rs -k 'not (test_activate or test_properties or test_Desktop_active)' test/test_wmctrl.py
|
||||
EOF
|
||||
chmod +x /tmp/test_script.sh
|
||||
xvfb-run /tmp/test_script.sh
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d806f65ac1554366b6e31d29d7be2e8893996c0acbb2824bbf2b1f49cf628a13
|
||||
size 2505
|
3
wmctrl-0.4.tar.gz
Normal file
3
wmctrl-0.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:66cbff72b0ca06a22ec3883ac3a4d7c41078bdae4fb7310f52951769b10e14e0
|
||||
size 5437
|
Reference in New Issue
Block a user