Hello community,

here is the log from the commit of package python-sge-pygame for 
openSUSE:Factory checked in at 2018-12-07 14:39:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sge-pygame (Old)
 and      /work/SRC/openSUSE:Factory/.python-sge-pygame.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sge-pygame"

Fri Dec  7 14:39:17 2018 rev:3 rq:655969 version:1.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sge-pygame/python-sge-pygame.changes      
2018-08-03 12:38:44.775698378 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-sge-pygame.new.19453/python-sge-pygame.changes
   2018-12-07 14:39:23.658774236 +0100
@@ -1,0 +2,7 @@
+Wed Dec  5 19:35:36 UTC 2018 - [email protected]
+
+- Update to version 1.5.1
+  * Made the uniseg dependency optional.
+  * Altered the way fonts are handled.
+
+-------------------------------------------------------------------

Old:
----
  sge-pygame-1.5.tar.gz

New:
----
  sge-pygame-1.5.1.tar.gz

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

Other differences:
------------------
++++++ python-sge-pygame.spec ++++++
--- /var/tmp/diff_new_pack.MQO1xb/_old  2018-12-07 14:39:25.278772230 +0100
+++ /var/tmp/diff_new_pack.MQO1xb/_new  2018-12-07 14:39:25.282772225 +0100
@@ -17,18 +17,20 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define major_version 1.5
 Name:           python-sge-pygame
-Version:        1.5
+Version:        1.5.1
 Release:        0
 Summary:        A 2-D game engine for Python
 License:        LGPL-3.0-or-later
 Group:          Development/Languages/Python
 Url:            http://stellarengine.nongnu.org
-Source:         
https://files.pythonhosted.org/packages/source/s/sge-pygame/sge-pygame-%{version}.tar.gz
+Source:         
http://download.savannah.gnu.org/releases/stellarengine/%{major_version}/sge-pygame-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 Requires:       python-pygame >= 1.9.1
 Requires:       python-six >= 1.4.0
+Requires:       python-uniseg
 BuildRequires:  fdupes
 BuildArch:      noarch
 %python_subpackages

++++++ sge-pygame-1.5.tar.gz -> sge-pygame-1.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/PKG-INFO new/sge-pygame-1.5.1/PKG-INFO
--- old/sge-pygame-1.5/PKG-INFO 2017-06-10 02:20:10.000000000 +0200
+++ new/sge-pygame-1.5.1/PKG-INFO       1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-Metadata-Version: 1.1
-Name: sge-pygame
-Version: 1.5
-Summary: A 2-D game engine for Python
-Home-page: http://stellarengine.nongnu.org
-Author: Julie Marchant
-Author-email: [email protected]
-License: GNU Lesser General Public License
-Description: The SGE Game Engine ("SGE", pronounced like "Sage") is a 
general-purpose
-        2-D game engine.  It takes care of several details for you so you can
-        focus on the game itself.  This makes more rapid game development
-        possible, and it also makes the SGE easy to learn.
-        
-        This implementation of the SGE uses Pygame as a backend.
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: DFSG approved
-Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or 
later (LGPLv3+)
-Classifier: Natural Language :: English
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Games/Entertainment
-Classifier: Topic :: Software Development
-Requires: pygame (>=1.9.1)
-Requires: six (>=1.4.0)
-Provides: sge
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/README new/sge-pygame-1.5.1/README
--- old/sge-pygame-1.5/README   2016-11-04 22:23:38.000000000 +0100
+++ new/sge-pygame-1.5.1/README 2017-06-10 14:52:15.000000000 +0200
@@ -26,8 +26,9 @@
 First, install the dependencies:
 
 - Python 2 (2.7 or later) or 3 (3.1 or later) <http://www.python.org>
-- Pygame 1.9.1 or later <http://pygame.org/download.shtml>
+- Pygame 1.9.1 or later <http://pygame.org>
 - Six 1.4.0 or later <https://pypi.python.org/pypi/six>
+- uniseg <https://pypi.python.org/pypi/uniseg>
 
 Once you have all the dependencies, install the SGE with the included
 setup.py script, e.g. with "python setup.py install".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/WHATSNEW.pygame 
new/sge-pygame-1.5.1/WHATSNEW.pygame
--- old/sge-pygame-1.5/WHATSNEW.pygame  2017-06-10 02:11:23.000000000 +0200
+++ new/sge-pygame-1.5.1/WHATSNEW.pygame        2017-07-13 22:20:05.000000000 
+0200
@@ -5,6 +5,14 @@
 
 ========================================================================
 
+1.5.1
+------------------------------------------------------------------------
+
+Pygame SGE misc changes:
+* Made the uniseg dependency optional.
+* Altered the way fonts are handled.
+
+
 1.5
 ------------------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/setup.py new/sge-pygame-1.5.1/setup.py
--- old/sge-pygame-1.5/setup.py 2017-06-10 02:12:12.000000000 +0200
+++ new/sge-pygame-1.5.1/setup.py       2017-07-18 17:44:50.000000000 +0200
@@ -16,7 +16,7 @@
 """.strip()
 
 setup(name="sge-pygame",
-      version="1.5",
+      version="1.5.1",
       description="A 2-D game engine for Python",
       long_description=long_description,
       author="Julie Marchant",
@@ -36,6 +36,6 @@
       packages=["sge"],
       package_dir={"sge": "sge"},
       package_data={"sge": ["COPYING", "COPYING.LESSER"]},
-      requires=["pygame (>=1.9.1)", "six (>=1.4.0)"],
+      requires=["pygame (>=1.9.1)", "six (>=1.4.0)", "uniseg"],
       provides=["sge"],
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/sge/__init__.py 
new/sge-pygame-1.5.1/sge/__init__.py
--- old/sge-pygame-1.5/sge/__init__.py  2017-06-10 02:13:12.000000000 +0200
+++ new/sge-pygame-1.5.1/sge/__init__.py        2017-07-18 17:44:36.000000000 
+0200
@@ -235,7 +235,7 @@
 from __future__ import print_function
 from __future__ import unicode_literals
 
-__version__ = "1.5"
+__version__ = "1.5.1"
 
 import sys
 import os
@@ -364,6 +364,8 @@
 # Global variables
 game = None
 
+os.environ['PYGAME_FREETYPE'] = '1'
+
 # Uncomment this line to tell SDL to center the window.  Disabled by
 # default because it seems to cause some weird behavior with window
 # resizing on at least some systems.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/sge/gfx.py 
new/sge-pygame-1.5.1/sge/gfx.py
--- old/sge-pygame-1.5/sge/gfx.py       2017-05-25 12:08:14.000000000 +0200
+++ new/sge-pygame-1.5.1/sge/gfx.py     2017-07-13 22:18:16.000000000 +0200
@@ -2547,44 +2547,31 @@
         self.__size = value
         self.rd["font"] = None
 
-        name = self.name
-        if isinstance(name, six.string_types):
-            name = [name]
-
-        names = []
-        compatible_fonts = [
-            ["liberation serif", "tinos", "nimbus roman no9 l", "nimbus roman",
-             "freeserif", "dejavu serif", "droid serif", "bitstream charter",
-             "times new roman"],
-            ["droid sans", "liberation sans", "arimo", "nimbus sans l",
-             "freesans", "dejavu sans", "droid sans fallback", "arial"],
-            ["liberation sans narrow", "freecondensed",
-             "sans condensed uralic", "arial narrow"],
-            ["liberation mono", "cousine", "nimbus mono l", "freemono",
-             "texgyrecursor", "courier prime", "dejavu sans mono",
-             "droid sans mono", "courier new", "courier"]]
-
-        try:
-            for n in name:
-                names.append(n)
-                for fonts in compatible_fonts:
-                    if n.lower() in fonts:
-                        for font in fonts:
-                            if font not in names:
-                                names.append(font)
-                        break
-        except TypeError:
-            # Most likely a non-iterable value, such as None, so we
-            # assume the default font is to be used.
-            names = ['']
+        if isinstance(self.name, six.string_types):
+            names = [self.name]
+        else:
+            try:
+                names = list(self.name)
+            except TypeError:
+                # Most likely a non-iterable value, such as None, so we
+                # assume the default font is to be used.
+                names = []
 
         for name in names:
             if os.path.isfile(name):
                 self.rd["font"] = pygame.font.Font(name, self.__size)
                 break
-
-        if self.rd.get("font") is None:
-            self.rd["font"] = pygame.font.SysFont(','.join(names), self.__size)
+            elif pygame.font.match_font(name):
+                self.rd["font"] = pygame.font.SysFont(
+                    ','.join(names), self.__size)
+                break
+        else:
+            default_names = [
+                "courier", "courier new", "courier prime", "freemono",
+                "liberation mono", "dejavu sans mono", "droid sans mono",
+                "nimbus mono l", "cousine", "texgyrecursor"]
+            self.rd["font"] = pygame.font.SysFont(
+                ','.join(default_names), self.__size)
 
         # Restore underline, bold, and italic settings.
         self.underline = underline
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sge-pygame-1.5/sge/r.py new/sge-pygame-1.5.1/sge/r.py
--- old/sge-pygame-1.5/sge/r.py 2017-06-02 15:30:14.000000000 +0200
+++ new/sge-pygame-1.5.1/sge/r.py       2017-07-12 23:22:03.000000000 +0200
@@ -35,7 +35,12 @@
 
 import pygame
 import six
-from uniseg.linebreak import line_break_units
+
+try:
+    from uniseg.linebreak import line_break_units
+    USE_UNISEG = True
+except ImportError:
+    USE_UNISEG = False
 
 import sge
 
@@ -492,7 +497,13 @@
             if self.rd["font"].size(line)[0] <= width:
                 split_text.append(line)
             else:
-                words = list(line_break_units(line))
+                if USE_UNISEG:
+                    words = list(line_break_units(line))
+                    jchar = ''
+                else:
+                    jchar = ' '
+                    words = line.split(jchar)
+
                 while words:
                     current_line = words.pop(0)
                     while self.rd["font"].size(current_line)[0] > width:
@@ -503,10 +514,10 @@
                             current_line = current_line[1:]
                         split_text.append(start)
 
-                    while (words and self.rd["font"].size(''.join(
+                    while (words and self.rd["font"].size(jchar.join(
                             [current_line, words[0]]).rstrip())[0] <= width):
-                        current_line = ''.join([current_line,
-                                                words.pop(0)])
+                        current_line = jchar.join([current_line,
+                                                   words.pop(0)])
                     split_text.append(current_line.rstrip())
                         
         return split_text


Reply via email to