diff -Nru glue-0.13/debian/changelog glue-0.13/debian/changelog --- glue-0.13/debian/changelog 2020-06-06 08:35:01.000000000 +0000 +++ glue-0.13/debian/changelog 2021-10-24 08:46:58.000000000 +0000 @@ -1,3 +1,22 @@ +glue (0.13-6) unstable; urgency=medium + + * debian/patches/fix_2to3: Patch for python3 (Closes: #997603) + + -- Angel Abad Sun, 24 Oct 2021 10:46:58 +0200 + +glue (0.13-5) unstable; urgency=medium + + * debian/tests/control: Add superficial restriction (Closes: #970951) + * debian/patches/20_jinja2_version: Remove, unused patch + * debian/patches/20_fix_python_prints: Fix errors with python prints + * debian/control: Build-Depends on python3:any + * debian/py3dist-overrides: Fix errors with jinja2 versions + * debian/lintian-overrides: Rename tag no-manual-page + * debian/watch: Use watch version 4 + * Bump standards version 4.6.0 + + -- Angel Abad Sat, 02 Oct 2021 10:49:49 +0200 + glue (0.13-4) unstable; urgency=medium * debian/rules: Use execute_before_ instead of override_ diff -Nru glue-0.13/debian/control glue-0.13/debian/control --- glue-0.13/debian/control 2020-06-06 08:21:10.000000000 +0000 +++ glue-0.13/debian/control 2021-10-24 08:20:50.000000000 +0000 @@ -4,10 +4,11 @@ Priority: optional Build-Depends: debhelper-compat (= 13), dh-python, + python3:any, python3-setuptools, python3-all, python3-sphinx -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Rules-Requires-Root: no Vcs-Browser: https://salsa.debian.org/debian/glue Vcs-Git: https://salsa.debian.org/debian/glue.git diff -Nru glue-0.13/debian/lintian-overrides glue-0.13/debian/lintian-overrides --- glue-0.13/debian/lintian-overrides 2019-09-26 06:15:32.000000000 +0000 +++ glue-0.13/debian/lintian-overrides 2021-10-24 08:20:50.000000000 +0000 @@ -1,2 +1,2 @@ -glue-sprite: binary-without-manpage usr/bin/glue-sprite +glue-sprite: no-manual-page usr/bin/glue-sprite diff -Nru glue-0.13/debian/patches/20_fix_python_prints glue-0.13/debian/patches/20_fix_python_prints --- glue-0.13/debian/patches/20_fix_python_prints 1970-01-01 00:00:00.000000000 +0000 +++ glue-0.13/debian/patches/20_fix_python_prints 2021-10-24 08:20:50.000000000 +0000 @@ -0,0 +1,22 @@ +Description: Fix new print syntax +Author: Angel Abad +Forwarded: no +Last-Update: 2021-10-02 + +--- glue-0.13.orig/docs/conf.py ++++ glue-0.13/docs/conf.py +@@ -53,10 +53,10 @@ import pkg_resources + try: + release = pkg_resources.get_distribution('glue').version + except pkg_resources.DistributionNotFound: +- print 'To build the documentation, The distribution information of glue' +- print 'Has to be available. Either install the package into your' +- print 'development environment or run "setup.py develop" to setup the' +- print 'metadata. A virtualenv is recommended!' ++ print ('To build the documentation, The distribution information of glue') ++ print ('Has to be available. Either install the package into your') ++ print ('development environment or run "setup.py develop" to setup the') ++ print ('metadata. A virtualenv is recommended!') + sys.exit(1) + del pkg_resources + diff -Nru glue-0.13/debian/patches/20_jinja2_version glue-0.13/debian/patches/20_jinja2_version --- glue-0.13/debian/patches/20_jinja2_version 2019-09-26 06:15:32.000000000 +0000 +++ glue-0.13/debian/patches/20_jinja2_version 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -Description: Update jinja2 dependency version -Author: Angel Abad -Last-Update: 2017-12-04 - ---- a/setup.py -+++ b/setup.py -@@ -4,7 +4,7 @@ - - install_requires=[ - 'Pillow>=2.2.2', -- 'Jinja2>=2.7,<2.10', -+ 'Jinja2>=2.7,<2.11', - ] - - tests_require=[ diff -Nru glue-0.13/debian/patches/fix_2to3 glue-0.13/debian/patches/fix_2to3 --- glue-0.13/debian/patches/fix_2to3 1970-01-01 00:00:00.000000000 +0000 +++ glue-0.13/debian/patches/fix_2to3 2021-10-24 08:42:39.000000000 +0000 @@ -0,0 +1,443 @@ +Description: Fix python 2 code tu run on python 3 +Author: Angel Abad +Bug-Debian: https://bugs.debian.org/997603 +Last-Update: 2021-10-24 + +--- glue-0.13.orig/glue/algorithms/__init__.py ++++ glue-0.13/glue/algorithms/__init__.py +@@ -1,9 +1,9 @@ +-from diagonal import DiagonalAlgorithm +-from horizontal import HorizontalAlgorithm +-from horizontal_bottom import HorizontalBottomAlgorithm +-from square import SquareAlgorithm +-from vertical import VerticalAlgorithm +-from vertical_right import VerticalRightAlgorithm ++from .diagonal import DiagonalAlgorithm ++from .horizontal import HorizontalAlgorithm ++from .horizontal_bottom import HorizontalBottomAlgorithm ++from .square import SquareAlgorithm ++from .vertical import VerticalAlgorithm ++from .vertical_right import VerticalRightAlgorithm + + algorithms = {'diagonal': DiagonalAlgorithm, + 'horizontal': HorizontalAlgorithm, +--- glue-0.13.orig/glue/bin.py ++++ glue-0.13/glue/bin.py +@@ -20,13 +20,13 @@ def main(argv=None): + + parser.add_argument("--source", "-s", + dest="source", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_SOURCE', None), + help="Source path") + + parser.add_argument("--output", "-o", + dest="output", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_OUTPUT', None), + help="Output path") + +@@ -80,7 +80,7 @@ def main(argv=None): + group.add_argument("-a", "--algorithm", + dest="algorithm", + metavar='NAME', +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_ALGORITHM', 'square'), + choices=['square', 'vertical', 'horizontal', + 'vertical-right', 'horizontal-bottom', +@@ -92,7 +92,7 @@ def main(argv=None): + group.add_argument("--ordering", + dest="algorithm_ordering", + metavar='NAME', +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_ORDERING', 'maxside'), + choices=['maxside', 'width', 'height', 'area', 'filename', + '-maxside', '-width', '-height', '-area', '-filename'], +@@ -100,7 +100,7 @@ def main(argv=None): + "filename (default: maxside)")) + + # Populate the parser with options required by other formats +- for format in formats.itervalues(): ++ for format in formats.values(): + format.populate_argument_parser(parser) + + # +@@ -146,7 +146,7 @@ def main(argv=None): + options.enabled_formats.remove('img') + + # Fail if any of the deprecated arguments is used +- for argument in deprecated_arguments.iterkeys(): ++ for argument in deprecated_arguments.keys(): + if getattr(options, argument, None): + parser.error(("{0} argument is deprectated " + "since v0.3").format(deprecated_arguments[argument])) +@@ -233,16 +233,16 @@ def main(argv=None): + manager.process() + else: + manager.process() +- except exceptions.ValidationError, e: ++ except exceptions.ValidationError as e: + sys.stderr.write(e.args[0]) + return e.error_code +- except exceptions.SourceImagesNotFoundError, e: ++ except exceptions.SourceImagesNotFoundError as e: + sys.stderr.write("Error: No images found in %s.\n" % e.args[0]) + return e.error_code +- except exceptions.NoSpritesFoldersFoundError, e: ++ except exceptions.NoSpritesFoldersFoundError as e: + sys.stderr.write("Error: No sprites folders found in %s.\n" % e.args[0]) + return e.error_code +- except exceptions.PILUnavailableError, e: ++ except exceptions.PILUnavailableError as e: + sys.stderr.write(("Error: PIL {0} decoder is unavailable" + "Please read the documentation and " + "install it before spriting this kind of " +--- glue-0.13.orig/glue/core.py ++++ glue-0.13/glue/core.py +@@ -3,8 +3,8 @@ import os + import sys + import copy + import hashlib +-import StringIO +-import ConfigParser ++import io ++import configparser + + from PIL import Image as PILImage + +@@ -23,11 +23,11 @@ class ConfigurableFromFile(object): + def clean(value): + return {'true': True, 'false': False}.get(value.lower(), value) + +- config = ConfigParser.RawConfigParser() ++ config = configparser.RawConfigParser() + config.read(os.path.join(self.config_path, filename)) + try: + keys = config.options(section) +- except ConfigParser.NoSectionError: ++ except configparser.NoSectionError: + return {} + return dict([[k, clean(config.get(section, k))] for k in keys]) + +@@ -48,16 +48,16 @@ class Image(ConfigurableFromFile): + with open(self.path, "rb") as img: + self._image_data = img.read() + +- print "\t{0} added to sprite".format(self.filename) ++ print("\t{0} added to sprite".format(self.filename)) + + @cached_property + def image(self): + """Return a Pil representation of this image """ + + if sys.version < '3': +- imageio = StringIO.StringIO(self._image_data) ++ imageio = io.StringIO(self._image_data) + else: +- imageio = StringIO.BytesIO(self._image_data) ++ imageio = io.BytesIO(self._image_data) + + try: + source_image = PILImage.open(imageio) +@@ -70,7 +70,7 @@ class Image(ConfigurableFromFile): + img.paste(source_image, (0, 0), mask=mask) + else: + img.paste(source_image, (0, 0)) +- except IOError, e: ++ except IOError as e: + raise PILUnavailableError(e.args[0].split()[1]) + finally: + imageio.close() +@@ -119,7 +119,7 @@ class Image(ConfigurableFromFile): + else: + data = [0] * 4 + +- return map(int, data) ++ return list(map(int, data)) + + @cached_property + def horizontal_spacing(self): +@@ -196,7 +196,7 @@ class Sprite(ConfigurableFromFile): + if ratio_output_key not in self.config: + self.config[ratio_output_key] = img_format.output_path(ratio) + +- print "Processing '{0}':".format(self.name) ++ print("Processing '{0}':".format(self.name)) + + # Generate sprite map + self.process() +@@ -220,7 +220,7 @@ class Sprite(ConfigurableFromFile): + hash_list.append(os.path.relpath(image.path)) + hash_list.append(image._image_data) + +- for key, value in self.config.iteritems(): ++ for key, value in self.config.items(): + hash_list.append(key) + hash_list.append(value) + +--- glue-0.13.orig/glue/formats/base.py ++++ glue-0.13/glue/formats/base.py +@@ -54,7 +54,7 @@ class BaseFormat(object): + @property + def format_label(self): + from glue.formats import formats +- return dict((v,k) for k, v in formats.iteritems())[self.__class__] ++ return dict((v,k) for k, v in formats.items())[self.__class__] + + @classmethod + def populate_argument_parser(cls, parser): +--- glue-0.13.orig/glue/formats/caat.py ++++ glue-0.13/glue/formats/caat.py +@@ -1,6 +1,6 @@ + import os + +-from base import BaseJSONFormat ++from .base import BaseJSONFormat + + + class CAATFormat(BaseJSONFormat): +--- glue-0.13.orig/glue/formats/cocos2d.py ++++ glue-0.13/glue/formats/cocos2d.py +@@ -1,6 +1,6 @@ + import os + +-from base import BasePlistFormat ++from .base import BasePlistFormat + + + class Cocos2dFormat(BasePlistFormat): +--- glue-0.13.orig/glue/formats/css.py ++++ glue-0.13/glue/formats/css.py +@@ -3,7 +3,7 @@ import os + import codecs + + from glue import __version__ +-from base import JinjaTextFormat ++from .base import JinjaTextFormat + + from ..exceptions import ValidationError + +@@ -16,7 +16,7 @@ class CssFormat(JinjaTextFormat): + 'first-letter', 'first-line', 'first-child', + 'before', 'after']) + +- template = u""" ++ template = """ + /* glue: {{ version }} hash: {{ hash }} */ + {% for image in images %}.{{ image.label }}{{ image.pseudo }}{%- if not image.last %},{{"\n"}}{%- endif %}{%- endfor %} { + background-image: url('{{ sprite_path }}'); +@@ -54,20 +54,20 @@ class CssFormat(JinjaTextFormat): + + group.add_argument("--namespace", + dest="css_namespace", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_CSS_NAMESPACE', 'sprite'), + help="Namespace for all css classes (default: sprite)") + + group.add_argument("--sprite-namespace", + dest="css_sprite_namespace", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_CSS_SPRITE_NAMESPACE', + '{sprite_name}'), + help="Namespace for all sprites (default: {sprite_name})") + + group.add_argument("-u", "--url", + dest="css_url", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_CSS_URL', ''), + help="Prepend this string to the sprites path") + +@@ -94,7 +94,7 @@ class CssFormat(JinjaTextFormat): + + group.add_argument("--separator", + dest="css_separator", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_CSS_SEPARATOR', '-'), + metavar='SEPARATOR', + help=("Customize the separator used to join CSS class " +@@ -103,7 +103,7 @@ class CssFormat(JinjaTextFormat): + + group.add_argument("--pseudo-class-separator", + dest="css_pseudo_class_separator", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_CSS_PSEUDO_CLASS_SEPARATOR', '__'), + metavar='SEPARATOR', + help=("Customize the separator glue will use in order " +@@ -163,7 +163,7 @@ class CssFormat(JinjaTextFormat): + if self.sprite.config['css_url']: + context['sprite_path'] = '{0}{1}'.format(self.sprite.config['css_url'], context['sprite_filename']) + +- for r, ratio in context['ratios'].iteritems(): ++ for r, ratio in context['ratios'].items(): + ratio['sprite_path'] = '{0}{1}'.format(self.sprite.config['css_url'], ratio['sprite_filename']) + + # Add cachebuster if required +@@ -174,7 +174,7 @@ class CssFormat(JinjaTextFormat): + + context['sprite_path'] = apply_cachebuster(context['sprite_path']) + +- for r, ratio in context['ratios'].iteritems(): ++ for r, ratio in context['ratios'].items(): + ratio['sprite_path'] = apply_cachebuster(ratio['sprite_path']) + + return context +@@ -213,6 +213,6 @@ class CssFormat(JinjaTextFormat): + if pseudo_classes: + for p in pseudo_classes: + label = label.replace('{0}{1}'.format(css_pseudo_class_separator, p), "") +- pseudo = ''.join(map(lambda x: ':{0}'.format(x), pseudo_classes)) ++ pseudo = ''.join([':{0}'.format(x) for x in pseudo_classes]) + + return label, pseudo +--- glue-0.13.orig/glue/formats/html.py ++++ glue-0.13/glue/formats/html.py +@@ -5,7 +5,7 @@ from .css import CssFormat + class HtmlFormat(CssFormat): + + extension = 'html' +- template = u""" ++ template = """ + + Glue Sprite Test Html + +--- glue-0.13.orig/glue/formats/img.py ++++ glue-0.13/glue/formats/img.py +@@ -19,7 +19,7 @@ class ImageFormat(BaseFormat): + + group.add_argument("--img", + dest="img_dir", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_IMG', True), + metavar='DIR', + help="Output directory for img files") +@@ -38,13 +38,13 @@ class ImageFormat(BaseFormat): + + group.add_argument("-p", "--padding", + dest="padding", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_PADDING', '0'), + help="Force this padding in all images") + + group.add_argument("--margin", + dest="margin", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_MARGIN', '0'), + help="Force this margin in all images") + +@@ -57,7 +57,7 @@ class ImageFormat(BaseFormat): + + group.add_argument("--ratios", + dest="ratios", +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_RATIOS', '1'), + help="Create sprites based on these ratios") + +--- glue-0.13.orig/glue/formats/jsonformat.py ++++ glue-0.13/glue/formats/jsonformat.py +@@ -6,7 +6,7 @@ try: + except ImportError: + from ordereddict import OrderedDict + +-from base import BaseJSONFormat ++from .base import BaseJSONFormat + + + class JSONFormat(BaseJSONFormat): +@@ -29,7 +29,7 @@ class JSONFormat(BaseJSONFormat): + group.add_argument("--json-format", + dest="json_format", + metavar='NAME', +- type=unicode, ++ type=str, + default=os.environ.get('GLUE_JSON_FORMAT', 'array'), + choices=['array', 'hash'], + help=("JSON structure format (array, hash)")) +@@ -60,7 +60,7 @@ class JSONFormat(BaseJSONFormat): + 'height': context['height']}) + + if self.sprite.config['json_format'] == 'array': +- data['frames'] = frames.values() ++ data['frames'] = list(frames.values()) + else: + data['frames'] = frames + +--- glue-0.13.orig/glue/formats/less.py ++++ glue-0.13/glue/formats/less.py +@@ -1,12 +1,12 @@ + import os + +-from css import CssFormat ++from .css import CssFormat + + + class LessFormat(CssFormat): + + extension = 'less' +- template = u""" ++ template = """ + /* glue: {{ version }} hash: {{ hash }} */ + {% for image in images %}.{{ image.label }}{{ image.pseudo }}{%- if not image.last %}, {%- endif %}{%- endfor %}{ + background-image:url('{{ sprite_path }}'); +--- glue-0.13.orig/glue/formats/scss.py ++++ glue-0.13/glue/formats/scss.py +@@ -1,6 +1,6 @@ + import os + +-from css import CssFormat ++from .css import CssFormat + + + class ScssFormat(CssFormat): +--- glue-0.13.orig/glue/helpers.py ++++ glue-0.13/glue/helpers.py +@@ -1,7 +1,7 @@ + import os + import sys + import contextlib +-from StringIO import StringIO ++from io import StringIO + + + def round_up(value): +--- glue-0.13.orig/glue/managers/base.py ++++ glue-0.13/glue/managers/base.py +@@ -41,7 +41,7 @@ class BaseManager(object): + format = format_cls(sprite=sprite) + format.validate() + if format.needs_rebuild() or sprite.config['force']: +- print "Format '{0}' for sprite '{1}' needs rebuild...".format(format_name, sprite.name) ++ print("Format '{0}' for sprite '{1}' needs rebuild...".format(format_name, sprite.name)) + format.build() + else: +- print "Format '{0}'' for sprite '{1}' already exists...".format(format_name, sprite.name) ++ print("Format '{0}'' for sprite '{1}' already exists...".format(format_name, sprite.name)) +--- glue-0.13.orig/glue/managers/watch.py ++++ glue-0.13/glue/managers/watch.py +@@ -39,5 +39,5 @@ class WatchManager(object): + + def signal_handler(self, signal, frame): + """ Gracefully close the app if Ctrl+C is pressed.""" +- print 'You pressed Ctrl+C!' ++ print('You pressed Ctrl+C!') + sys.exit(0) +--- glue-0.13.orig/setup.py ++++ glue-0.13/setup.py +@@ -57,5 +57,4 @@ setup( + ] + }, + zip_safe = False, +- use_2to3=True + ) diff -Nru glue-0.13/debian/patches/series glue-0.13/debian/patches/series --- glue-0.13/debian/patches/series 2019-09-26 06:15:32.000000000 +0000 +++ glue-0.13/debian/patches/series 2021-10-24 08:41:46.000000000 +0000 @@ -1,2 +1,3 @@ 10_rename_command -20_jinja2_version +20_fix_python_prints +fix_2to3 diff -Nru glue-0.13/debian/py3dist-overrides glue-0.13/debian/py3dist-overrides --- glue-0.13/debian/py3dist-overrides 2020-06-06 08:04:44.000000000 +0000 +++ glue-0.13/debian/py3dist-overrides 2021-10-24 08:20:50.000000000 +0000 @@ -1 +1 @@ -Jinja2 python3-jinja2 (>= 2.7), python3-jinja2 (<< 2.12) +Jinja2 python3-jinja2 diff -Nru glue-0.13/debian/tests/control glue-0.13/debian/tests/control --- glue-0.13/debian/tests/control 2019-09-26 06:15:32.000000000 +0000 +++ glue-0.13/debian/tests/control 2020-09-26 17:13:07.000000000 +0000 @@ -1,2 +1,3 @@ Test-Command: glue-sprite --version Depends: glue-sprite +Restrictions: superficial diff -Nru glue-0.13/debian/watch glue-0.13/debian/watch --- glue-0.13/debian/watch 2019-09-26 06:15:32.000000000 +0000 +++ glue-0.13/debian/watch 2021-10-24 08:20:50.000000000 +0000 @@ -1,4 +1,4 @@ -version=3 +version=4 opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ https://pypi.debian.net/glue/glue-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))