Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-xkbcommon for
openSUSE:Factory checked in at 2024-05-03 19:45:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xkbcommon (Old)
and /work/SRC/openSUSE:Factory/.python-xkbcommon.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xkbcommon"
Fri May 3 19:45:36 2024 rev:3 rq:1171477 version:1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xkbcommon/python-xkbcommon.changes
2023-02-14 16:45:27.178453462 +0100
+++
/work/SRC/openSUSE:Factory/.python-xkbcommon.new.1880/python-xkbcommon.changes
2024-05-03 19:45:56.983905128 +0200
@@ -1,0 +2,7 @@
+Thu May 2 21:51:13 UTC 2024 - Dirk Müller <[email protected]>
+
+- update to 1.0:
+ * add key_get_mods_for_level
+ * add python 3.12 support
+
+-------------------------------------------------------------------
Old:
----
python-xkbcommon-0.8.tar.gz
New:
----
python-xkbcommon-1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-xkbcommon.spec ++++++
--- /var/tmp/diff_new_pack.ymcBnl/_old 2024-05-03 19:45:58.127946720 +0200
+++ /var/tmp/diff_new_pack.ymcBnl/_new 2024-05-03 19:45:58.139947156 +0200
@@ -1,7 +1,7 @@
#
-# spec file
+# spec file for package python-xkbcommon
#
-# Copyright (c) 2023 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
@@ -18,17 +18,18 @@
%bcond_without test
%define pyname xkbcommon
+%{?sle15_python_module_pythons}
Name: python-%{pyname}
-Version: 0.8
+Version: 1.0
Release: 0
Summary: Python bindings for libxkbcommon using cffi
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/sde1000/python-xkbcommon
Source0:
https://files.pythonhosted.org/packages/source/x/xkbcommon/%{pyname}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# Patch0: fix-xkbcommon-paths.patch
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@@ -42,18 +43,15 @@
Python bindings for libxkbcommon using cffi
%prep
-%setup -q -n %{pyname}-%{version}
-#%%patch0 -p1
+%autosetup -p1 -n %{pyname}-%{version}
%build
-export CFLAGS="-I/usr/include/libxkbcommon ${CFLAGS}"
+export CFLAGS="%optflags $(pkg-config --cflags xkbcommon)"
%python_exec xkbcommon/ffi_build.py
-%python_build
+%pyproject_wheel
%install
-export CFLAGS="%optflags $(pkg-config --cflags xkbcommon)"
-%python_install
-
+%pyproject_install
%{python_expand %fdupes %{buildroot}%{$python_sitearch}}
%if %{with test}
@@ -68,5 +66,6 @@
%files %{python_files}
%license LICENSE
%doc README.rst
-%{python_sitearch}/*
+%{python_sitearch}/xkbcommon
+%{python_sitearch}/xkbcommon-%{version}.dist-info
++++++ python-xkbcommon-0.8.tar.gz -> python-xkbcommon-1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/PKG-INFO new/xkbcommon-1.0/PKG-INFO
--- old/xkbcommon-0.8/PKG-INFO 2023-01-12 00:55:11.186813400 +0100
+++ new/xkbcommon-1.0/PKG-INFO 2024-04-10 16:12:16.277598400 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: xkbcommon
-Version: 0.8
+Version: 1.0
Summary: Bindings for libxkbcommon using cffi
Home-page: https://github.com/sde1000/python-xkbcommon
Author: Stephen Early
@@ -9,15 +9,14 @@
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.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
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
-Requires-Python: >=3.6
+Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/setup.cfg new/xkbcommon-1.0/setup.cfg
--- old/xkbcommon-0.8/setup.cfg 2023-01-12 00:55:11.186813400 +0100
+++ new/xkbcommon-1.0/setup.cfg 2024-04-10 16:12:16.277598400 +0200
@@ -1,6 +1,6 @@
[metadata]
name = xkbcommon
-version = 0.8
+version = 1.0
description = Bindings for libxkbcommon using cffi
long_description = file: README.rst
long_description_content_type = text/x-rst
@@ -13,17 +13,16 @@
classifiers =
Development Status :: 4 - Beta
License :: OSI Approved :: MIT License
- Programming Language :: Python :: 3.6
- Programming Language :: Python :: 3.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
Topic :: Software Development :: Libraries
Intended Audience :: Developers
[options]
-python_requires = >= 3.6
+python_requires = >= 3.8
packages =
xkbcommon
setup_requires =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/tests/test_xkb.py
new/xkbcommon-1.0/tests/test_xkb.py
--- old/xkbcommon-0.8/tests/test_xkb.py 2023-01-11 23:00:20.000000000 +0100
+++ new/xkbcommon-1.0/tests/test_xkb.py 2024-04-10 16:10:58.000000000 +0200
@@ -252,6 +252,15 @@
key = next(iter(self.km))
self.assertEqual(self.km.num_levels_for_key(key, 0), 1)
+ def test_keymap_key_get_mods_for_level(self):
+ first_invalid_mask = 1 << self.km.num_mods()
+ for key in self.km:
+ for layout in range(self.km.num_layouts_for_key(key)):
+ for level in range(self.km.num_levels_for_key(key, layout)):
+ r = self.km.key_get_mods_for_level(key, layout, level)
+ for mm in r:
+ self.assertLess(mm, first_invalid_mask)
+
def test_keymap_key_get_syms_by_level(self):
for key in self.km:
r = self.km.key_get_syms_by_level(key, 0, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/xkbcommon/ffi_build.py
new/xkbcommon-1.0/xkbcommon/ffi_build.py
--- old/xkbcommon-0.8/xkbcommon/ffi_build.py 2023-01-11 22:50:54.000000000
+0100
+++ new/xkbcommon-1.0/xkbcommon/ffi_build.py 2024-04-10 16:10:58.000000000
+0200
@@ -1,7 +1,7 @@
from cffi import FFI
ffibuilder = FFI()
-# Currently implemented with reference to libxkbcommon-0.6.0
+# Currently implemented with reference to libxkbcommon-1.0.0
ffibuilder.set_source("xkbcommon._ffi", """
#include <stdarg.h>
@@ -253,6 +253,14 @@
xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t key,
xkb_layout_index_t layout);
+size_t
+xkb_keymap_key_get_mods_for_level(struct xkb_keymap *keymap,
+ xkb_keycode_t key,
+ xkb_layout_index_t layout,
+ xkb_level_index_t level,
+ xkb_mod_mask_t *masks_out,
+ size_t masks_size);
+
int
xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap,
xkb_keycode_t key,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/xkbcommon/xkb.py
new/xkbcommon-1.0/xkbcommon/xkb.py
--- old/xkbcommon-0.8/xkbcommon/xkb.py 2023-01-11 22:52:55.000000000 +0100
+++ new/xkbcommon-1.0/xkbcommon/xkb.py 2024-04-10 16:10:58.000000000 +0200
@@ -618,6 +618,29 @@
"""
return lib.xkb_keymap_num_levels_for_key(self._keymap, key, layout)
+ def key_get_mods_for_level(self, key, layout, level):
+ """Retrieves every possible modifier mask that produces the specified
+ shift level for a specific key and layout.
+
+ This API is useful for inverse key transformation;
+ i.e. finding out which modifiers need to be active in order to
+ be able to type the keysym(s) corresponding to the specific
+ key code, layout and level.
+
+ If layout is out of range for this key (that is, larger or
+ equal to the value returned by Keymap.num_layouts_for_key()),
+ it is brought back into range in a manner consistent with
+ State.key_get_layout().
+ """
+ masks_size = 4
+ while True:
+ masks_out = ffi.new(f"xkb_mod_mask_t[{masks_size}]")
+ r = lib.xkb_keymap_key_get_mods_for_level(
+ self._keymap, key, layout, level, masks_out, masks_size)
+ if r < masks_size:
+ return [masks_out[n] for n in range(r)]
+ masks_size = masks_size << 1
+
def key_get_syms_by_level(self, key, layout, level):
"""Get the keysyms obtained from pressing a key in a given layout and
shift level.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/xkbcommon-0.8/xkbcommon.egg-info/PKG-INFO
new/xkbcommon-1.0/xkbcommon.egg-info/PKG-INFO
--- old/xkbcommon-0.8/xkbcommon.egg-info/PKG-INFO 2023-01-12
00:55:11.000000000 +0100
+++ new/xkbcommon-1.0/xkbcommon.egg-info/PKG-INFO 2024-04-10
16:12:16.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: xkbcommon
-Version: 0.8
+Version: 1.0
Summary: Bindings for libxkbcommon using cffi
Home-page: https://github.com/sde1000/python-xkbcommon
Author: Stephen Early
@@ -9,15 +9,14 @@
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.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
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
-Requires-Python: >=3.6
+Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE