Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-wmctrl for openSUSE:Factory checked in at 2024-12-09 21:12:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wmctrl (Old) and /work/SRC/openSUSE:Factory/.python-wmctrl.new.29675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wmctrl" Mon Dec 9 21:12:53 2024 rev:4 rq:1229358 version:0.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wmctrl/python-wmctrl.changes 2023-01-26 14:09:37.075993357 +0100 +++ /work/SRC/openSUSE:Factory/.python-wmctrl.new.29675/python-wmctrl.changes 2024-12-09 21:13:57.434954621 +0100 @@ -1,0 +2,22 @@ +Mon Dec 9 11:08:46 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to version 0.5 + * Add missing dependency + * Remove use of deprecated py.test in tests + * commit some edits which has been living in my local copy for years + * Modernized the packaging configuration + * Added automatic release workflow + * Added specification on what module to package + * Bumped up the version + * Fixed trigger for the publish action + * Fixed content-type parameter +- Switch package to modern Python Stack on SLE-15 + * Use Python 3.11 on SLE-15 by default + * Drop support for older Python versions +- Switch build system from setuptools to pyproject.toml + * Add python-pip and python-wheel to BuildRequires + * Replace %python_build with %pyproject_wheel + * Replace %python_install with %pyproject_install +- Update Requires from pyproject.toml + +------------------------------------------------------------------- Old: ---- wmctrl-0.4.tar.gz New: ---- wmctrl-0.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wmctrl.spec ++++++ --- /var/tmp/diff_new_pack.nn65Td/_old 2024-12-09 21:13:57.834971357 +0100 +++ /var/tmp/diff_new_pack.nn65Td/_new 2024-12-09 21:13:57.834971357 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-wmctrl # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,9 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-wmctrl -Version: 0.4 +Version: 0.5 Release: 0 Summary: Python programmatic control of X windows # Project is in the process of transitioning from Bitbucket to GitHub @@ -26,8 +26,10 @@ Group: Development/Languages/Python URL: https://github.com/antocuni/wmctrl Source: https://files.pythonhosted.org/packages/source/w/wmctrl/wmctrl-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: openbox BuildRequires: python-rpm-macros @@ -36,6 +38,7 @@ BuildRequires: xfontsel BuildRequires: xorg-x11-server BuildRequires: xvfb-run +Requires: python-attrs Requires: wmctrl Requires: xorg-x11-server BuildArch: noarch @@ -50,10 +53,10 @@ sed -i 's/\(py$\|py\.test\)/pytest/g' test/test_wmctrl.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check ++++++ wmctrl-0.4.tar.gz -> wmctrl-0.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/.gitignore new/wmctrl-0.5/.gitignore --- old/wmctrl-0.4/.gitignore 2021-04-23 18:37:57.000000000 +0200 +++ new/wmctrl-0.5/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,138 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/MANIFEST.in new/wmctrl-0.5/MANIFEST.in --- old/wmctrl-0.4/MANIFEST.in 2021-04-23 18:37:57.000000000 +0200 +++ new/wmctrl-0.5/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -# Include the license file -include LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/PKG-INFO new/wmctrl-0.5/PKG-INFO --- old/wmctrl-0.4/PKG-INFO 2021-04-23 18:38:43.000000000 +0200 +++ new/wmctrl-0.5/PKG-INFO 2023-09-17 01:01:15.623342500 +0200 @@ -1,10 +1,25 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: wmctrl -Version: 0.4 +Version: 0.5 Summary: A tool to programmatically control windows inside X -Home-page: https://github.com/antocuni/wmctrl -Author: Antonio Cuni -Author-email: anto.c...@gmail.com +Author-email: Antonio Cuni <anto.c...@gmail.com> License: MIT -Description: A tool to programmatically control windows inside X -Platform: UNKNOWN +Project-URL: Homepage, https://github.com/antocuni/wmctrl +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Requires-Python: >=2.7 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: attrs +Provides-Extra: test +Requires-Dist: pytest; extra == "test" + +A tool to programmatically control windows inside X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/pyproject.toml new/wmctrl-0.5/pyproject.toml --- old/wmctrl-0.4/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/wmctrl-0.5/pyproject.toml 2023-09-17 01:01:03.000000000 +0200 @@ -0,0 +1,41 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "wmctrl" +version = "0.5" +description = "A tool to programmatically control windows inside X" +authors = [{name = "Antonio Cuni", email = "anto.c...@gmail.com"}] +license = {text = "MIT"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +requires-python = ">=2.7" +dependencies = ["attrs"] + +[project.readme] +text = "A tool to programmatically control windows inside X" +content-type = "text/x-rst" + +[project.urls] +Homepage = "https://github.com/antocuni/wmctrl" + +[project.optional-dependencies] +test = ["pytest"] + +[tool.setuptools] +py-modules = ["wmctrl"] + +[tool.pytest.ini_options] +addopts = "-rsx --tb=short" +testpaths = ["test"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/setup.cfg new/wmctrl-0.5/setup.cfg --- old/wmctrl-0.4/setup.cfg 2021-04-23 18:38:43.000000000 +0200 +++ new/wmctrl-0.5/setup.cfg 2023-09-17 01:01:15.627342500 +0200 @@ -1,3 +1,6 @@ +[bdist_wheel] +universal = 1 + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/setup.py new/wmctrl-0.5/setup.py --- old/wmctrl-0.4/setup.py 2021-04-23 18:38:15.000000000 +0200 +++ new/wmctrl-0.5/setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -from setuptools import setup, find_packages - - -setup( - name='wmctrl', - version='0.4', - author='Antonio Cuni', - author_email='anto.c...@gmail.com', - py_modules=['wmctrl'], - url='https://github.com/antocuni/wmctrl', - license='MIT', - description='A tool to programmatically control windows inside X', - long_description='A tool to programmatically control windows inside X' -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/test/test_wmctrl.py new/wmctrl-0.5/test/test_wmctrl.py --- old/wmctrl-0.4/test/test_wmctrl.py 2021-04-23 18:37:57.000000000 +0200 +++ new/wmctrl-0.5/test/test_wmctrl.py 2023-09-17 01:01:03.000000000 +0200 @@ -1,4 +1,4 @@ -import py +import pytest import subprocess import time from wmctrl import Window, Desktop @@ -90,7 +90,7 @@ check_geometry('100x200+30+40') def test_geometry_negative(): - py.test.skip('fixme') + pytest.skip('fixme') check_geometry('100x200-30-40') def test_properties(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/wmctrl.egg-info/PKG-INFO new/wmctrl-0.5/wmctrl.egg-info/PKG-INFO --- old/wmctrl-0.4/wmctrl.egg-info/PKG-INFO 2021-04-23 18:38:43.000000000 +0200 +++ new/wmctrl-0.5/wmctrl.egg-info/PKG-INFO 2023-09-17 01:01:15.000000000 +0200 @@ -1,10 +1,25 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: wmctrl -Version: 0.4 +Version: 0.5 Summary: A tool to programmatically control windows inside X -Home-page: https://github.com/antocuni/wmctrl -Author: Antonio Cuni -Author-email: anto.c...@gmail.com +Author-email: Antonio Cuni <anto.c...@gmail.com> License: MIT -Description: A tool to programmatically control windows inside X -Platform: UNKNOWN +Project-URL: Homepage, https://github.com/antocuni/wmctrl +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: MIT License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Requires-Python: >=2.7 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: attrs +Provides-Extra: test +Requires-Dist: pytest; extra == "test" + +A tool to programmatically control windows inside X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/wmctrl.egg-info/SOURCES.txt new/wmctrl-0.5/wmctrl.egg-info/SOURCES.txt --- old/wmctrl-0.4/wmctrl.egg-info/SOURCES.txt 2021-04-23 18:38:43.000000000 +0200 +++ new/wmctrl-0.5/wmctrl.egg-info/SOURCES.txt 2023-09-17 01:01:15.000000000 +0200 @@ -1,10 +1,10 @@ -.gitignore LICENSE -MANIFEST.in -setup.py +pyproject.toml +setup.cfg wmctrl.py test/test_wmctrl.py wmctrl.egg-info/PKG-INFO wmctrl.egg-info/SOURCES.txt wmctrl.egg-info/dependency_links.txt +wmctrl.egg-info/requires.txt wmctrl.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/wmctrl.egg-info/requires.txt new/wmctrl-0.5/wmctrl.egg-info/requires.txt --- old/wmctrl-0.4/wmctrl.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/wmctrl-0.5/wmctrl.egg-info/requires.txt 2023-09-17 01:01:15.000000000 +0200 @@ -0,0 +1,4 @@ +attrs + +[test] +pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wmctrl-0.4/wmctrl.py new/wmctrl-0.5/wmctrl.py --- old/wmctrl-0.4/wmctrl.py 2021-04-23 18:37:57.000000000 +0200 +++ new/wmctrl-0.5/wmctrl.py 2023-09-17 01:01:03.000000000 +0200 @@ -1,16 +1,16 @@ +from __future__ import print_function import attr VERSBOSE = False def getoutput(s): try: - from commands import getoutput + import commands as subprocess # for PY2 except ImportError: - from subprocess import getoutput - + import subprocess if VERSBOSE: print(s) - return getoutput(s) + return subprocess.getoutput(s) def system(s): import os @@ -82,7 +82,7 @@ for line in out.splitlines(): parts = line.split(None, 9) parts = list(map(str.strip, parts)) - parts[1:7] = map(int, parts[1:7]) + parts[1:7] = list(map(int, parts[1:7])) if len(parts) == 9: # title is missing parts.append('') elif len(parts) != 10: @@ -182,11 +182,17 @@ system('wmctrl -i -r %s -b %s' % (self.id, proparg)) def set_decorations(self, v): - import gtk.gdk - w = gtk.gdk.window_foreign_new(int(self.id, 16)) - w.set_decorations(v) - gtk.gdk.window_process_all_updates() - gtk.gdk.flush() + try: + # try to use gtk + import gtk.gdk + w = gtk.gdk.window_foreign_new(int(self.id, 16)) + w.set_decorations(v) + gtk.gdk.window_process_all_updates() + gtk.gdk.flush() + except ImportError: + # try to use my utilty + op = int(bool(v)) # 1 or 0 + system("set-x11-decorations %s %s" % (self.id, op)) def maximize(self, verb='add'): "verb can be 'add', 'remove' or 'toggle'" @@ -225,7 +231,13 @@ return None if __name__ == '__main__': - for w in Window.list(): - print('{w.id:10s} {w.x:4d} {w.y:4d} {w.w:4d} {w.h:4d} {w.wm_name} - {w.wm_class} - {w.wm_window_role}'.format(w=w)) - - + class magic(object): + def __getattr__(self, name): + return name + windows = Window.list() + windows.sort(key=lambda w:w.wm_class) + print('{s.id:<10} {s.x:>4} {s.y:>4} {s.w:>4} {s.h:>4} ' + '{s.class:>37} {s.role:>15} {s.name}'.format(s=magic())) + for w in windows: + print('{w.id:<10} {w.x:>4d} {w.y:>4d} {w.w:4d} {w.h:4d} ' + '{w.wm_class:>37} {w.wm_window_role:>15} {w.wm_name}'.format(w=w))