Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-glfw for openSUSE:Factory 
checked in at 2023-12-17 21:33:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-glfw (Old)
 and      /work/SRC/openSUSE:Factory/.python-glfw.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-glfw"

Sun Dec 17 21:33:21 2023 rev:11 rq:1133686 version:2.6.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-glfw/python-glfw.changes  2022-10-29 
20:18:46.702745044 +0200
+++ /work/SRC/openSUSE:Factory/.python-glfw.new.25432/python-glfw.changes       
2023-12-17 21:35:25.236333248 +0100
@@ -1,0 +2,17 @@
+Sun Dec 17 02:13:39 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 2.6.3:
+  * Fixed wrapper for glfwGetMonitorWorkarea
+  * Implemented search for GLFW library specific to frozen
+    executables
+  * Revert changes made in 2.6.0
+  * Do not search for GLFW library when running in a frozen
+    executable
+  * Use multiprocessing for library version detection on non-
+    Windows systems
+  * Fixed package version in CHANGELOG.md and glfw/__init__.py
+  * Added more wrappers for unreleased macros
+  * Added support for PYGLFW_LIBRARY_VARIANT
+  * Added warnings for deprecated functions
+
+-------------------------------------------------------------------

Old:
----
  glfw-2.5.5.tar.gz

New:
----
  glfw-2.6.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-glfw.spec ++++++
--- /var/tmp/diff_new_pack.yPZ8Y6/_old  2023-12-17 21:35:25.644348073 +0100
+++ /var/tmp/diff_new_pack.yPZ8Y6/_new  2023-12-17 21:35:25.644348073 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-glfw
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 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-glfw
-Version:        2.5.5
+Version:        2.6.3
 Release:        0
 Summary:        A ctypes-based wrapper for GLFW3
 License:        MIT

++++++ glfw-2.5.5.tar.gz -> glfw-2.6.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/CHANGELOG.md new/glfw-2.6.3/CHANGELOG.md
--- old/glfw-2.5.5/CHANGELOG.md 2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/CHANGELOG.md 2023-11-17 08:41:44.000000000 +0100
@@ -4,6 +4,32 @@
 
 For information on changes in GLFW itself, see the [GLFW version 
history](https://www.glfw.org/changelog.html).
 
+
+## [2.6.3] - 2023-11-17
+- Fixed wrapper for glfwGetMonitorWorkarea
+
+## [2.6.2] - 2023-06-30
+- Implemented search for GLFW library specific to frozen executables
+
+## [2.6.1] - 2023-06-23
+- Revert changes made in 2.6.0
+- Do not search for GLFW library when running in a frozen executable
+
+## [2.6.0] - 2023-06-23
+- Use multiprocessing for library version detection on non-Windows systems
+
+## [2.5.9] - 2023-04-01
+- Fixed package version in CHANGELOG.md and glfw/__init__.py
+
+## [2.5.8] - 2023-04-01
+- Added more wrappers for unreleased macros
+
+## [2.5.7] - 2023-03-15
+- Added support for PYGLFW_LIBRARY_VARIANT
+
+## [2.5.6] - 2023-02-01
+- Added warnings for deprecated functions
+
 ## [2.5.5] - 2022-09-07
 - Added wrappers for unreleased macros
 - Fixed set_monitor_user_pointer and get_monitor_user_pointer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/PKG-INFO new/glfw-2.6.3/PKG-INFO
--- old/glfw-2.5.5/PKG-INFO     2022-09-07 18:29:33.729395400 +0200
+++ new/glfw-2.6.3/PKG-INFO     2023-11-17 08:41:56.322559800 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: glfw
-Version: 2.5.5
+Version: 2.6.3
 Summary: A ctypes-based wrapper for GLFW3.
 Home-page: https://github.com/FlorianRhiem/pyGLFW
 Author: Florian Rhiem
@@ -79,7 +79,10 @@
 Linux
 ~~~~~
 
-The GLFW shared library is included in the Python wheels for Linux.
+The GLFW shared library is included in the Python wheels for Linux. Although
+pyGLFW will try to detect whether the GLFW library for Wayland or X11 should
+be used, you can set the ``PYGLFW_LIBRARY_VARIANT`` variable to ``wayland`` or
+``x11`` to select either variant of the library.
 
 If you cannot use these on your system, you can install the GLFW shared
 library using a package management system (e.g. ``apt install libglfw3``
@@ -91,6 +94,14 @@
 in ``LD_LIBRARY_PATH``). If you want to use a specific library, you can set
 the ``PYGLFW_LIBRARY`` environment variable to its path.
 
+cx_Freeze / PyInstaller
+~~~~~~~~~~~~~~~~~~~~~~~
+
+pyGLFW will search for the GLFW library in the current working directory, the 
directory
+of the executable and in the package on non-Windows platforms if running in an
+executable frozen with cx_Freeze or PyInstaller, unless the ``PYGLFW_LIBRARY``
+environment variable is set.
+
 Development Version
 ~~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/README.rst new/glfw-2.6.3/README.rst
--- old/glfw-2.5.5/README.rst   2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/README.rst   2023-11-17 08:41:44.000000000 +0100
@@ -58,7 +58,10 @@
 Linux
 ~~~~~
 
-The GLFW shared library is included in the Python wheels for Linux.
+The GLFW shared library is included in the Python wheels for Linux. Although
+pyGLFW will try to detect whether the GLFW library for Wayland or X11 should
+be used, you can set the ``PYGLFW_LIBRARY_VARIANT`` variable to ``wayland`` or
+``x11`` to select either variant of the library.
 
 If you cannot use these on your system, you can install the GLFW shared
 library using a package management system (e.g. ``apt install libglfw3``
@@ -70,6 +73,14 @@
 in ``LD_LIBRARY_PATH``). If you want to use a specific library, you can set
 the ``PYGLFW_LIBRARY`` environment variable to its path.
 
+cx_Freeze / PyInstaller
+~~~~~~~~~~~~~~~~~~~~~~~
+
+pyGLFW will search for the GLFW library in the current working directory, the 
directory
+of the executable and in the package on non-Windows platforms if running in an
+executable frozen with cx_Freeze or PyInstaller, unless the ``PYGLFW_LIBRARY``
+environment variable is set.
+
 Development Version
 ~~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/glfw/GLFW.py new/glfw-2.6.3/glfw/GLFW.py
--- old/glfw-2.5.5/glfw/GLFW.py 2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/glfw/GLFW.py 2023-11-17 08:41:44.000000000 +0100
@@ -453,6 +453,9 @@
         POSITION_Y as GLFW_POSITION_Y,
         WAYLAND_APP_ID as GLFW_WAYLAND_APP_ID,
         CURSOR_CAPTURED as GLFW_CURSOR_CAPTURED,
+        WAYLAND_LIBDECOR as GLFW_WAYLAND_LIBDECOR,
+        WAYLAND_PREFER_LIBDECOR as GLFW_WAYLAND_PREFER_LIBDECOR,
+        WAYLAND_DISABLE_LIBDECOR as GLFW_WAYLAND_DISABLE_LIBDECOR,
         init_allocator as glfwInitAllocator,
         init_vulkan_loader as glfwInitVulkanLoader,
         get_platform as glfwGetPlatform,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/glfw/__init__.py 
new/glfw-2.6.3/glfw/__init__.py
--- old/glfw-2.5.5/glfw/__init__.py     2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/glfw/__init__.py     2023-11-17 08:41:44.000000000 +0100
@@ -7,9 +7,9 @@
 from __future__ import unicode_literals
 
 __author__ = 'Florian Rhiem ([email protected])'
-__copyright__ = 'Copyright (c) 2013-2021 Florian Rhiem'
+__copyright__ = 'Copyright (c) 2013-2023 Florian Rhiem'
 __license__ = 'MIT'
-__version__ = '2.5.5'
+__version__ = '2.6.3'
 
 # By default, GLFW errors will be handled by a pre-defined error callback.
 # Depending on the value of ERROR_REPORTING, this callback will:
@@ -652,6 +652,10 @@
     WAYLAND_APP_ID = 0x00026001
     CURSOR_CAPTURED = 0x00034004
 
+    WAYLAND_LIBDECOR = 0x00053001
+    WAYLAND_PREFER_LIBDECOR = 0x00038001
+    WAYLAND_DISABLE_LIBDECOR = 0x00038002
+
 _exc_info_from_callback = None
 def _callback_exception_decorator(func):
     @functools.wraps(func)
@@ -991,6 +995,8 @@
     _glfw.glfwGetMonitorWorkarea.restype = None
     _glfw.glfwGetMonitorWorkarea.argtypes = [ctypes.POINTER(_GLFWmonitor),
                                         ctypes.POINTER(ctypes.c_int),
+                                        ctypes.POINTER(ctypes.c_int),
+                                        ctypes.POINTER(ctypes.c_int),
                                         ctypes.POINTER(ctypes.c_int)]
 
 
@@ -2299,6 +2305,8 @@
     Wrapper for:
         void glfwSetClipboardString(GLFWwindow* window, const char* string);
     """
+    if window is not None:
+        warnings.warn("The window parameter to glfwSetClipboardString is 
deprecated", DeprecationWarning, stacklevel=2)
     _glfw.glfwSetClipboardString(window, _to_char_p(string))
 
 _glfw.glfwGetClipboardString.restype = ctypes.c_char_p
@@ -2310,6 +2318,8 @@
     Wrapper for:
         const char* glfwGetClipboardString(GLFWwindow* window);
     """
+    if window is not None:
+        warnings.warn("The window parameter to glfwSetClipboardString is 
deprecated", DeprecationWarning, stacklevel=2)
     return _glfw.glfwGetClipboardString(window)
 
 _glfw.glfwGetTime.restype = ctypes.c_double
@@ -2448,6 +2458,7 @@
         Wrapper for:
             GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, 
GLFWcharmodsfun cbfun);
         """
+        warnings.warn("glfwSetCharModsCallback is scheduled for removal in 
GLFW 4.0", DeprecationWarning, stacklevel=2)
         window_addr = ctypes.cast(ctypes.pointer(window),
                                   ctypes.POINTER(ctypes.c_long)).contents.value
         if window_addr in _window_char_mods_callback_repository:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/glfw/library.py 
new/glfw-2.6.3/glfw/library.py
--- old/glfw-2.5.5/glfw/library.py      2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/glfw/library.py      2023-11-17 08:41:44.000000000 +0100
@@ -20,10 +20,12 @@
     """
     Finds and returns filenames which might be the library you are looking for.
     """
-    candidates = set()
-    for library_name in library_names:
-        for search_path in library_search_paths:
-            glob_query = os.path.join(search_path, '*'+library_name+'*')
+    candidates = []
+    for search_path in library_search_paths:
+        if not search_path:
+            continue
+        for library_name in library_names:
+            glob_query = os.path.join(search_path, '*'+library_name+'.*')
             for filename in glob.iglob(glob_query):
                 filename = os.path.realpath(filename)
                 if filename in candidates:
@@ -38,11 +40,11 @@
                 for file_extension in library_file_extensions:
                     if basename_end.startswith(file_extension):
                         if basename_end[len(file_extension):][:1] in ('', '.'):
-                            candidates.add(filename)
-                    if basename_end.endswith(file_extension):
+                            candidates.append(filename)
+                    elif basename_end.endswith(file_extension):
                         basename_middle = basename_end[:-len(file_extension)]
                         if all(c in '0123456789.' for c in basename_middle):
-                            candidates.add(filename)
+                            candidates.append(filename)
     return candidates
 
 
@@ -55,7 +57,7 @@
                                           library_file_extensions,
                                           library_search_paths)
     library_versions = []
-    for filename in candidates:
+    for filename in set(candidates):
         version = version_check_callback(filename)
         if version is not None and version >= (3, 0, 0):
             library_versions.append((version, filename))
@@ -66,6 +68,39 @@
     return ctypes.CDLL(library_versions[-1][1])
 
 
+def _load_first_library(library_names, library_file_extensions,
+                        library_search_paths):
+    """
+    Finds, loads and returns the first found version of the library.
+    """
+    candidates = _find_library_candidates(
+        library_names,
+        library_file_extensions,
+        library_search_paths
+    )
+    library = None
+    for filename in candidates:
+        if os.path.isfile(filename):
+            try:
+                library = ctypes.CDLL(filename)
+                break
+            except OSError:
+                pass
+    if library is not None:
+        major_value = ctypes.c_int(0)
+        major = ctypes.pointer(major_value)
+        minor_value = ctypes.c_int(0)
+        minor = ctypes.pointer(minor_value)
+        rev_value = ctypes.c_int(0)
+        rev = ctypes.pointer(rev_value)
+        if hasattr(library, 'glfwGetVersion'):
+            library.glfwGetVersion(major, minor, rev)
+            version = (major_value.value, minor_value.value, rev_value.value)
+            if version >= (3, 0, 0):
+                return library
+    return None
+
+
 def _glfw_get_version(filename):
     """
     Queries and returns the library version tuple or None by using a
@@ -140,13 +175,9 @@
         '/usr/lib/arm-linux-gnueabihf',
     ]
 
-    if sys.platform != 'darwin':
-        # manylinux2014 wheels contain libraries built for X11 and Wayland
-        if os.environ.get('XDG_SESSION_TYPE') == 'wayland':
-            search_paths.insert(1, os.path.join(package_path, 'wayland'))
-        else:
-            # X11 is the default, even if XDG_SESSION_TYPE is not set
-            search_paths.insert(1, os.path.join(package_path, 'x11'))
+    package_path_variant = _get_package_path_variant(package_path)
+    if package_path_variant:
+        search_paths.insert(1, package_path_variant)
 
     if sys.platform == 'darwin':
         path_environment_variable = 'DYLD_LIBRARY_PATH'
@@ -157,6 +188,35 @@
     return search_paths
 
 
+def _get_frozen_library_search_paths():
+    """
+    Returns a list of library search paths for frozen executables.
+    """
+    current_path = os.path.abspath(os.getcwd())
+    executable_path = os.path.abspath(os.path.dirname(sys.executable))
+    package_path = os.path.abspath(os.path.dirname(__file__))
+    package_path_variant = _get_package_path_variant(package_path)
+    return [
+        executable_path,
+        package_path_variant,
+        package_path,
+        current_path
+    ]
+
+
+def _get_package_path_variant(package_path):
+    if sys.platform in ('darwin', 'win32'):
+        return None
+    # manylinux2014 wheels contain libraries built for X11 and Wayland
+    if os.environ.get('PYGLFW_LIBRARY_VARIANT', '').lower() in ['wayland', 
'x11']:
+        return os.path.join(package_path, 
os.environ['PYGLFW_LIBRARY_VARIANT'].lower())
+    elif os.environ.get('XDG_SESSION_TYPE') == 'wayland':
+        return os.path.join(package_path, 'wayland')
+    else:
+        # X11 is the default, even if XDG_SESSION_TYPE is not set
+        return os.path.join(package_path, 'x11')
+
+
 if os.environ.get('PYGLFW_LIBRARY', ''):
     try:
         glfw = ctypes.CDLL(os.environ['PYGLFW_LIBRARY'])
@@ -190,6 +250,10 @@
             glfw = ctypes.CDLL(os.path.join(sys.prefix, 'Library', 'bin', 
'glfw3.dll'))
         except OSError:
             pass
-else:
+elif not getattr(sys, "frozen", False):
     glfw = _load_library(['glfw', 'glfw3'], ['.so', '.dylib'],
                           _get_library_search_paths(), _glfw_get_version)
+else:
+
+    glfw = _load_first_library(['glfw', 'glfw3'], ['.so', '.dylib'],
+                               _get_frozen_library_search_paths())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/glfw.egg-info/PKG-INFO 
new/glfw-2.6.3/glfw.egg-info/PKG-INFO
--- old/glfw-2.5.5/glfw.egg-info/PKG-INFO       2022-09-07 18:29:33.000000000 
+0200
+++ new/glfw-2.6.3/glfw.egg-info/PKG-INFO       2023-11-17 08:41:56.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: glfw
-Version: 2.5.5
+Version: 2.6.3
 Summary: A ctypes-based wrapper for GLFW3.
 Home-page: https://github.com/FlorianRhiem/pyGLFW
 Author: Florian Rhiem
@@ -79,7 +79,10 @@
 Linux
 ~~~~~
 
-The GLFW shared library is included in the Python wheels for Linux.
+The GLFW shared library is included in the Python wheels for Linux. Although
+pyGLFW will try to detect whether the GLFW library for Wayland or X11 should
+be used, you can set the ``PYGLFW_LIBRARY_VARIANT`` variable to ``wayland`` or
+``x11`` to select either variant of the library.
 
 If you cannot use these on your system, you can install the GLFW shared
 library using a package management system (e.g. ``apt install libglfw3``
@@ -91,6 +94,14 @@
 in ``LD_LIBRARY_PATH``). If you want to use a specific library, you can set
 the ``PYGLFW_LIBRARY`` environment variable to its path.
 
+cx_Freeze / PyInstaller
+~~~~~~~~~~~~~~~~~~~~~~~
+
+pyGLFW will search for the GLFW library in the current working directory, the 
directory
+of the executable and in the package on non-Windows platforms if running in an
+executable frozen with cx_Freeze or PyInstaller, unless the ``PYGLFW_LIBRARY``
+environment variable is set.
+
 Development Version
 ~~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/glfw-2.5.5/setup.py new/glfw-2.6.3/setup.py
--- old/glfw-2.5.5/setup.py     2022-09-07 18:29:18.000000000 +0200
+++ new/glfw-2.6.3/setup.py     2023-11-17 08:41:44.000000000 +0100
@@ -8,7 +8,7 @@
 
 setup(
     name='glfw',
-    version='2.5.5',
+    version='2.6.3',
     description='A ctypes-based wrapper for GLFW3.',
     long_description=long_description,
     url='https://github.com/FlorianRhiem/pyGLFW',

Reply via email to