diff -Nru angrydd-1.0.1/debian/changelog angrydd-1.0.1/debian/changelog --- angrydd-1.0.1/debian/changelog 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/changelog 2019-08-09 18:47:59.000000000 +0000 @@ -1,3 +1,16 @@ +angrydd (1.0.1-13) unstable; urgency=medium + + * Team upload. + * Port to Python 3. (Closes: #912479) + * Drop trailing whitespaces. + * Point Vcs-* fields to salsa. + * Drop upstream homepage and watch file as the URL no longer exists. + * Update Standards-Version to 4.4.0: + - declare that d/rules does not require root + * Update to debhelper compat level 12. + + -- Reiner Herrmann Fri, 09 Aug 2019 20:47:59 +0200 + angrydd (1.0.1-12) unstable; urgency=medium * Switch to compat level 11. @@ -129,4 +142,3 @@ * debian/watch: Added. -- Bart Martens Mon, 13 Nov 2006 15:39:44 +0100 - diff -Nru angrydd-1.0.1/debian/compat angrydd-1.0.1/debian/compat --- angrydd-1.0.1/debian/compat 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru angrydd-1.0.1/debian/control angrydd-1.0.1/debian/control --- angrydd-1.0.1/debian/control 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/control 2019-08-09 18:47:59.000000000 +0000 @@ -5,20 +5,21 @@ Uploaders: Markus Koschany Build-Depends: - debhelper (>= 11), - python, - python-pygame -Standards-Version: 4.2.1 -Homepage: https://www.sacredchao.net/~piman/angrydd/ -VCS-Git: https://anonscm.debian.org/git/pkg-games/angrydd.git -VCS-Browser: https://anonscm.debian.org/cgit/pkg-games/angrydd.git + debhelper-compat (= 12), + dh-python, + python3, + python3-pygame +Standards-Version: 4.4.0 +Rules-Requires-Root: no +Vcs-Git: https://salsa.debian.org/games-team/angrydd.git +Vcs-Browser: https://salsa.debian.org/games-team/angrydd Package: angrydd Architecture: all Depends: - python-pygame, + python3-pygame, ${misc:Depends}, - ${python:Depends} + ${python3:Depends} Description: Angry Drunken Dwarves - falling blocks puzzle game In Angry, Drunken Dwarves, you are an angry, drunken dwarf. Why are you so angry? Who knows. But you've decided to take your aggression out on other diff -Nru angrydd-1.0.1/debian/patches/python3.patch angrydd-1.0.1/debian/patches/python3.patch --- angrydd-1.0.1/debian/patches/python3.patch 1970-01-01 00:00:00.000000000 +0000 +++ angrydd-1.0.1/debian/patches/python3.patch 2019-08-09 18:47:59.000000000 +0000 @@ -0,0 +1,694 @@ +Author: Reiner Herrmann +Description: Port to Python 3 +Bug-Debian: https://bugs.debian.org/912479 + +--- a/config.py ++++ b/config.py +@@ -4,7 +4,7 @@ + __revision__ = "$Id: config.py 291 2004-09-09 00:38:52Z piman $" + + import os +-from ConfigParser import ConfigParser ++from configparser import ConfigParser + from constants import * + from pygame import display + +@@ -87,7 +87,7 @@ + + def get_matches(): + m = _config.getint("settings", "matches") +- return "Best %d/%d" % ((m / 2) + 1, m) ++ return "Best %d/%d" % ((m // 2) + 1, m) + + def set_speed(menu, platform, pos, key): + s = _config.getint("settings", "speed") +--- a/angrydd.py ++++ b/angrydd.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # angrydd - a falling block puzzle game + # Copyright 2004 Joe Wreschnig +@@ -27,7 +27,7 @@ + import sys + + def print_help(): +- print """\ ++ print("""\ + Usage: %s [ --debug | --help | --version ] + Options: + --help, -h Print this help message and exit. +@@ -35,17 +35,17 @@ + --debug Start without Psyco support, for profiling and debugging. + --profile Start with profiling (implies --debug). + """ %( +- sys.argv[0]) ++ sys.argv[0])) + raise SystemExit + + def print_version(): +- print """\ ++ print("""\ + Angry Drunken Dwarves %s - a falling block puzzle game + Copyright 2004 %s + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU GPL version 2, as published +-by the Free Software Foundation.""" % (__version__, __author__) ++by the Free Software Foundation.""" % (__version__, __author__)) + raise SystemExit + + if __name__ == "__main__": +@@ -214,11 +214,11 @@ + # Shut down Pygame, save configuration data, turn on the Unlocker. + def quit(*args): + pygame.quit() +- print "Saving configuration." ++ print("Saving configuration.") + config.unlock("unlocker") + if int(config.get("scores-versus-3", "1").split(",")[1]) > 20000: + config.unlock("single") +- config.write(file(rc_file, "w")) ++ config.write(open(rc_file, "w")) + raise SystemExit + + if __name__ == "__main__": +@@ -230,7 +230,7 @@ + try: + import psyco + psyco.full() +- print "Psyco optimizing compiler found. Using psyco.full()." ++ print("Psyco optimizing compiler found. Using psyco.full().") + except ImportError: pass + + if profile: +--- a/load.py ++++ b/load.py +@@ -68,20 +68,20 @@ + elif v == 1: rgb = [1, 1, 1] # white + elif v == 0: rgb = [0, 0, 0] # black + else: +- h = h / 60.0 +- i = math.floor(h) +- f = h - i +- p = v * (1 - s) +- q = v * (1 - s * f) +- t = v * (1 - s * (1 - f)) +- if i == 0: rgb = [v, t, p] +- elif i == 1: rgb = [q, v, p] +- elif i == 2: rgb = [p, v, t] +- elif i == 3: rgb = [p, q, v] +- elif i == 4: rgb = [t, p, v] +- else: rgb = [v, p, q] ++ h = h / 60.0 ++ i = math.floor(h) ++ f = h - i ++ p = v * (1 - s) ++ q = v * (1 - s * f) ++ t = v * (1 - s * (1 - f)) ++ if i == 0: rgb = [v, t, p] ++ elif i == 1: rgb = [q, v, p] ++ elif i == 2: rgb = [p, v, t] ++ elif i == 3: rgb = [p, q, v] ++ elif i == 4: rgb = [t, p, v] ++ else: rgb = [v, p, q] + for i in range(3): +- rgb[i] = int(rgb[i] * 255) ++ rgb[i] = int(rgb[i] * 255) + return rgb + + def gem(color, w, h): +@@ -95,12 +95,12 @@ + for entry in GEM_POLYGON: + if color == "gray": col = hsv_to_rgb(hue, 0, entry[0][1]) + else: col = hsv_to_rgb(hue, entry[0][0], entry[0][1]) +- points = [] +- if (w == 1 and h == 1): +- points = entry[1] +- else: +- for point in entry[1]: +- points += [[point[0] * w, point[1] * h]] ++ points = [] ++ if (w == 1 and h == 1): ++ points = entry[1] ++ else: ++ for point in entry[1]: ++ points += [[point[0] * w, point[1] * h]] + pygame.draw.polygon(surf, col, points) + pygame.draw.aalines(surf, col, True, points, True) + surf = surf.convert() +@@ -114,7 +114,7 @@ + if os.path.exists(path + ".zip"): store = DirStore(path + ".zip") + else: store = DirStore(path) + try: return pygame.mixer.Sound(store.open(filename)) +- except ValueError, s: ++ except ValueError as s: + #print "W: Unable to load %s: %s" % (filename, s) + return pygame_ext.FakeSound() + # Load an image, or exit gracefully if it fails. +--- a/dirstore.py ++++ b/dirstore.py +@@ -31,9 +31,8 @@ + import os + import stat + import fnmatch +-import exceptions + +-try: import cStringIO as StringIO ++try: from io import StringIO + except ImportError: import StringIO + + # Trick borrowed from Peter Norvig's Python IAQ: +@@ -66,7 +65,7 @@ + if ver.split(".") > version.split("."): + raise ImportError("you need at least dirstore %s to run this (you have %s)" % (ver, version)) + +-class DirStoreError(exceptions.RuntimeError): ++class DirStoreError(RuntimeError): + """All exceptions specific to DirStores will be subclasses of this + type of exception.""" + pass +@@ -321,7 +320,7 @@ + except AttributeError: return self._open(name) + + def _open(self, name): +- return StringIO.StringIO(self.read(name)) ++ return StringIO(self.read(name)) + + def _visit(arg, dirname, names): + ns, selfname = arg +@@ -340,13 +339,15 @@ + return self._namelist + except AttributeError: + names = [] +- os.path.walk(self.name, _visit, (names, self.name)) ++ arg = (names, self.name) ++ for (dirpath, dirnames, filenames) in os.walk(self.name): ++ _visit(arg, dirpath, filenames + dirnames) + self._namelist = names + return self._namelist + + def _open(self, name): + name = os.path.join(self.name, name) +- return file(name, "rb") ++ return open(name, "rb") + + def _info(self, name): + fullname = os.path.join(self.name, name) +@@ -355,7 +356,7 @@ + + def _read(self, name): + name = os.path.join(self.name, name) +- return file(name).read() ++ return open(name).read() + + __doc__ += " - Directories in a local filesystem hierarchy. (Enabled)\n" + FORMATS.append((os.path.isdir, _FSStore)) +--- a/pygame_ext.py ++++ b/pygame_ext.py +@@ -13,9 +13,9 @@ + def new_load(filename): + try: mixer.music._load(filename) + except error: +- print ("W: Unable to load %s" % filename), +- if os.path.exists(filename): print "(is your soundcard in use?)" +- else: print "(where's the full sounds/ directory?)" ++ print(("W: Unable to load %s " % filename), end=''), ++ if os.path.exists(filename): print("(is your soundcard in use?)") ++ else: print("(where's the full sounds/ directory?)") + pass + + def new_play(loop): +@@ -72,7 +72,7 @@ + def new_Sound(filename): + try: return mixer._Sound(filename) + except error: +- print ("W: Unable to load %s" % filename), ++ print(("W: Unable to load %s " % filename), end='') + return FakeSound() + + mixer.Sound = new_Sound +@@ -84,4 +84,4 @@ + if not isinstance(mixer._Sound, type) or hasattr(mixer._Sound, name): + if name.startswith("get_"): return (lambda *args: 0) + else: return (lambda *args: None) +- else: raise AttributeError, name ++ else: raise AttributeError(name) +--- a/characters.py ++++ b/characters.py +@@ -11,6 +11,8 @@ + import dirstore; dirstore.require("0.1") + from dirstore import DirStore + ++from functools import cmp_to_key ++ + import config + import random + import load +@@ -163,7 +165,7 @@ + char_base = os.path.join(angrydd_path, "characters") + try: + Character.default = Character(os.path.join(char_base, "default")) +- except StandardError, s: ++ except StandardError as s: + try: + Character.default = Character(os.path.join(char_base, + "default.zip")) +@@ -188,20 +190,20 @@ + try: + name += ".dwarf" + arcade.append(Character(os.path.join(char_base, name))) +- except StandardError, s: ++ except StandardError as s: + try: + name += ".zip" + arcade.append(Character(os.path.join(char_base, name))) +- except StandardError, s: +- print "W: Unable to load character %s: %s" % (name, s) +- print "W: Arcade mode disabled." ++ except StandardError as s: ++ print("W: Unable to load character %s: %s" % (name, s)) ++ print("W: Arcade mode disabled.") + + for name in dir: + if "dwarf" in name: + try: + avail.append(Character(os.path.join(char_base, name))) +- except StandardError, s: +- print "W: Unable to load character %s: %s" % (name, s) +- avail.sort(lambda a, b: cmp(a.name, b.name)) ++ except StandardError as s: ++ print("W: Unable to load character %s: %s" % (name, s)) ++ avail.sort(key=cmp_to_key(lambda a, b: (a.name > b.name) - (a.name < b.name))) + Character.available = avail + Character.arcade = arcade +--- a/game.py ++++ b/game.py +@@ -11,6 +11,8 @@ + from pygame.color import Color + from pygame import mixer, transform + ++from functools import cmp_to_key ++ + from constants import * + + import events; from events import Event, EventManager +@@ -60,7 +62,7 @@ + rows.append([random.choice(COLORS) for i in range(15)]) + count -= 15 + if count != 0: +- possible = range(15) ++ possible = list(range(15)) + to_fill = [] + rows.append([random.choice(COLORS) for i in range(15)]) + while count > 0 and len(possible) > 0: +@@ -305,8 +307,8 @@ + + # Tick all ticking boxes; replace them if their time runs out. + def tick(self, Box = Box): +- tickers = filter(lambda b: isinstance(b, TickBox), +- util.flatten(self._field)) ++ tickers = list(filter(lambda b: isinstance(b, TickBox), ++ util.flatten(self._field))) + extickers = [] + for t in tickers: + t.tick() +@@ -323,12 +325,15 @@ + # give a bonus. + def tech_bonus(self): pass + ++ def cmp(self, x, y): ++ return (x > y) - (x < y) ++ + # Try to merge boxes into bigger ones; return True if one + # merged successfully (only merges one) + def merge(self): +- boxes = filter(lambda b: isinstance(b, Box), +- util.flatten(self._field)) +- boxes.sort(lambda a, b: cmp(b.y, a.y) and cmp(a.x, b.x)) ++ boxes = list(filter(lambda b: isinstance(b, Box), ++ util.flatten(self._field))) ++ boxes.sort(key=cmp_to_key(lambda a, b: self.cmp(b.y, a.y) and self.cmp(a.x, b.x))) + for box in boxes: + dead = box.try_merge(self) + if len(dead) > 0: return dead +@@ -337,11 +342,11 @@ + # Break everything that will break; return the "value" of + # the broken + def breaking(self): +- breakers = filter(lambda b: isinstance(b, BreakBox), +- util.flatten(self._field)) ++ breakers = list(filter(lambda b: isinstance(b, BreakBox), ++ util.flatten(self._field))) + killed_count = sum([b.try_crash(self) for b in breakers + if not b.crashed]) +- dead = filter(lambda b: b and b.crashed, util.flatten(self._field)) ++ dead = list(filter(lambda b: b and b.crashed, util.flatten(self._field))) + for box in dead: box.remove_from(self) + return killed_count, dead + +@@ -724,7 +729,7 @@ + else: return [] + + def die(self): +- print "Player %d is dead!" % (self._pid + 1) ++ print("Player %d is dead!" % (self._pid + 1)) + self.dead = True + + def tick(self): pass +@@ -736,7 +741,7 @@ + self.dead = False + self._gen = BoxGen(self._rand, self.colors, + isinstance(self, SinglePlayer)) +- self.others = filter(lambda x: x is not self, others) ++ self.others = list(filter(lambda x: x is not self, others)) + + self.dead_image = pygame.Surface([self.field.width * 32, + self.field.height * 32]) +@@ -883,7 +888,7 @@ + def update(self, time): + VersusPlayer.update(self, time) + if self._iter: +- move = self._iter.next() ++ move = next(self._iter) + if move != None: + self._iter = None + self._goal = move +@@ -993,7 +998,7 @@ + self._light_axe = self._pickaxe.copy() + alphs = pygame.surfarray.pixels_alpha(self._light_axe) + for row in alphs: +- for i in range(len(row)): row[i] = row[i] / 2 ++ for i in range(len(row)): row[i] = row[i] // 2 + del(alphs) + + def play(self, matches, wins): +@@ -1002,11 +1007,11 @@ + + for i in range(wins[0]): + screen.blit(self._pickaxe, [225 + 70 * i, 400]) +- for i in range(wins[0], (matches + 1) / 2): ++ for i in range(wins[0], (matches + 1) // 2): + screen.blit(self._light_axe, [225 + 70 * i, 400]) + for i in range(wins[1]): + screen.blit(self._pickaxe, [505 - 70 * i, 500]) +- for i in range(wins[1], (matches + 1) / 2): ++ for i in range(wins[1], (matches + 1) // 2): + screen.blit(self._light_axe, [505 - 70 * i, 500]) + pygame.display.update() + +@@ -1266,7 +1271,7 @@ + self.block_out() + + try: +- winner = filter(lambda p: not p.dead, self._players)[0] ++ winner = list(filter(lambda p: not p.dead, self._players))[0] + except IndexError: + # In the case that both players die simultaneously, we just + # choose a random winner. Less than ideal. +@@ -1385,7 +1390,7 @@ + em = EventManager() + if scorer is None: scorer = winner + screen = pygame.display.get_surface() +- print "Player %d wins!" % (winner._pid + 1) ++ print("Player %d wins!" % (winner._pid + 1)) + wipes.wipe_out() + wipes.wipe_in(winner.char.images["background"]) + font = textfx.WrapFont(30, 400) +--- a/util.py ++++ b/util.py +@@ -34,6 +34,6 @@ + + def tick(self, fps = 60): + t = self._time() +- sleep = (1000 / fps) - (t - self._last_tick) ++ sleep = (1000 // fps) - (t - self._last_tick) + self._last_tick = t + if sleep > 0: pygame.time.wait(sleep) +--- a/wipes.py ++++ b/wipes.py +@@ -12,56 +12,56 @@ + def line_out_l2r(): + screen = display.get_surface() + w, h = screen.get_size() +- for x in chain(xrange(0, w, 2), xrange(w - 1, 0, -2)): ++ for x in chain(range(0, w, 2), range(w - 1, 0, -2)): + display.update(draw.line(screen, [0, 0, 0], [x, 0], [x, h])) + c.tick(700) + + def line_out_r2l(): + screen = display.get_surface() + w, h = screen.get_size() +- for x in chain(xrange(w - 1, 0, -2), xrange(0, w, 2)): ++ for x in chain(range(w - 1, 0, -2), range(0, w, 2)): + display.update(draw.line(screen, [0, 0, 0], [x, 0], [x, h])) + c.tick(700) + + def line_out_t2b(): + screen = display.get_surface() + w, h = screen.get_size() +- for y in chain(xrange(0, h, 2), xrange(h - 1, 0, -2)): ++ for y in chain(range(0, h, 2), range(h - 1, 0, -2)): + display.update(draw.line(screen, [0, 0, 0], [0, y], [w, y])) + c.tick(700) + + def line_out_b2t(): + screen = display.get_surface() + w, h = screen.get_size() +- for y in chain(xrange(h - 1, 0, -2), xrange(0, h, 2)): ++ for y in chain(range(h - 1, 0, -2), range(0, h, 2)): + display.update(draw.line(screen, [0, 0, 0], [0, y], [w, y])) + c.tick(700) + + def line_in_l2r(surf): + screen = display.get_surface() + w, h = screen.get_size() +- for x in chain(xrange(0, w, 2), xrange(w - 1, 0, -2)): ++ for x in chain(range(0, w, 2), range(w - 1, 0, -2)): + display.update(screen.blit(surf, [x, 0, 1, h], [x, 0, 1, h])) + c.tick(700) + + def line_in_r2l(surf): + screen = display.get_surface() + w, h = screen.get_size() +- for x in chain(xrange(w - 1, 0, -2), xrange(0, w, 2)): ++ for x in chain(range(w - 1, 0, -2), range(0, w, 2)): + display.update(screen.blit(surf, [x, 0, 1, h], [x, 0, 1, h])) + c.tick(700) + + def line_in_t2b(surf): + screen = display.get_surface() + w, h = screen.get_size() +- for y in chain(xrange(0, h, 2), xrange(h - 1, 0, -2)): ++ for y in chain(range(0, h, 2), range(h - 1, 0, -2)): + display.update(screen.blit(surf, [0, y, w, 1], [0, y, w, 1])) + c.tick(700) + + def line_in_b2t(surf): + screen = display.get_surface() + w, h = screen.get_size() +- for y in chain(xrange(h - 1, 0, -2), xrange(0, h, 2)): ++ for y in chain(range(h - 1, 0, -2), range(0, h, 2)): + display.update(screen.blit(surf, [0, y, w, 1], [0, y, w, 1])) + c.tick(700) + +--- a/boxes.py ++++ b/boxes.py +@@ -35,7 +35,7 @@ + if self.y != 0: + for x in range(self.x, self._get_right()): + adj.append(field[self.y - 1][x]) +- return filter(None, adj) ++ return list(filter(None, adj)) + + # And so on. + def _adj_bottom(self, field): +@@ -44,14 +44,14 @@ + if b != field.height: + for x in range(self.x, self._get_right()): + adj.append(field[b][x]) +- return filter(None, adj) ++ return list(filter(None, adj)) + + def _adj_left(self, field): + adj = [] + if self.x != 0: + for y in range(self.y, self._get_bottom()): + adj.append(field[y][self.x - 1]) +- return filter(None, adj) ++ return list(filter(None, adj)) + + def _adj_right(self, field): + adj = [] +@@ -59,7 +59,7 @@ + if r != field.width: + for y in range(self.y, self._get_bottom()): + adj.append(field[y][r]) +- return filter(None, adj) ++ return list(filter(None, adj)) + + # All blocks adjacent to this one. + def adjacent(self, field): +@@ -103,7 +103,7 @@ + def crash(self, field, gem, immed = False): + broken = 0 + if not self.crashed and gem.color == self.color: +- broken += self.size[0] * self.size[1] * (sum(self.size) / 2) ++ broken += self.size[0] * self.size[1] * (sum(self.size) // 2) + self.crashed = True + for box in self.adjacent(field): + broken += box.crash(field, self) +@@ -134,7 +134,7 @@ + + # Find all instances of a given type in a sequence. + def instances_in(sequence, typ): +- return filter(lambda x: isinstance(x, typ), sequence) ++ return list(filter(lambda x: isinstance(x, typ), sequence)) + + class SpriteBox(Sprite): + def __init__(self, color, type = ""): +--- a/charselect.py ++++ b/charselect.py +@@ -31,7 +31,7 @@ + drops = [DropDisplay([240, 20]), DropDisplay([240, 320])] + stats = [StatDisplay([240, 150]), StatDisplay([240, 450])] + descs = [DescDisplay([430, 20]), DescDisplay([430, 320])] +- char_sprites = zip(portraits, names, drops, stats, descs) ++ char_sprites = list(zip(portraits, names, drops, stats, descs)) + + idx = [0, 0] + confirmed = [False, False] +@@ -136,7 +136,7 @@ + + def set_char(self, char): + stats = char.stats +- y = self._height * len(stats) + self._height/2 ++ y = self._height * len(stats) + self._height//2 + self.image = pygame.Surface([400, y], SRCALPHA, 32) + + for i, stat in enumerate(stats): +--- a/ai.py ++++ b/ai.py +@@ -128,7 +128,7 @@ + def average_height(self): + s = 4 * self.get_height(3) # This is very bad to fill up + s += sum([self.get_height(x) for x in range(self.width)]) +- return s / self.width ++ return s // self.width + + def stddev_height(self): + avg = self.average_height() +@@ -141,7 +141,7 @@ + + # Expand given only one box; total states = field.width. + def expand1(self, box, rand = True): +- columns = range(self.width) ++ columns = list(range(self.width)) + if rand: random.shuffle(columns) + + for col in columns: +@@ -154,8 +154,8 @@ + # Expand the state space based on the boxes given. 4 orientations, + # width of 6 = 22 expansions (after illegal ones removed). + def expand(self, boxes, rand = True): +- orientations = range(4) +- columns = range(self.width) ++ orientations = list(range(4)) ++ columns = list(range(self.width)) + if rand: + random.shuffle(orientations) + random.shuffle(columns) +--- a/menu.py ++++ b/menu.py +@@ -83,7 +83,7 @@ + secs = [] + for c in range(1, 10, 2): + sec = "scores-versus-%d" % c +- name = "Top Scores: Best %d/%d" % (c / 2 + 1, c) ++ name = "Top Scores: Best %d/%d" % (c // 2 + 1, c) + secs.append((sec, name)) + if config.getboolean("unlock", "single"): + secs.append(("scores-single", "Top Scores: Single Player")) +@@ -194,7 +194,7 @@ + self.rect = self.image.get_rect(bottomleft = [0, 600]) + if self._update - t > 1000: + txt = self._lines[self._idx] +- r = txt.get_rect(center = [self._w / 2, self._h / 2]) ++ r = txt.get_rect(center = [self._w // 2, self._h // 2]) + self.image.blit(txt, r) + elif t < self._update: + p = (self._update - t) / 1000.0 +@@ -205,7 +205,7 @@ + txt2 = self._lines[idx2] + r1 = txt1.get_rect() + r2 = txt2.get_rect() +- r2.centerx = r1.centerx = self._w / 2 ++ r2.centerx = r1.centerx = self._w // 2 + r2.top = wy + r1.bottom = wy + self.image.blit(txt1, r1) +@@ -214,5 +214,5 @@ + self._idx = (self._idx + 1) % len(self._lines) + self._update = t + 4000 + txt = self._lines[self._idx] +- r = txt.get_rect(center = [self._w / 2, self._h / 2]) ++ r = txt.get_rect(center = [self._w // 2, self._h // 2]) + self.image.blit(txt, r) +--- a/textfx.py ++++ b/textfx.py +@@ -91,7 +91,7 @@ + def shadow(string, font, color = [255, 255, 255]): + if isinstance(font, int): font = pygame.font.Font(None, font) + t1 = font.render(string, True, color) +- t2 = font.render(string, True, [c / 10 for c in color]) ++ t2 = font.render(string, True, [c // 10 for c in color]) + srf = pygame.Surface([t1.get_width() + 1, t1.get_height() + 1], + SRCALPHA, 32) + srf.blit(t2, [1, 1]) +--- a/Makefile ++++ b/Makefile +@@ -29,7 +29,7 @@ + + check: + @/bin/echo -n "Checking for Python... " +- @which python || ( echo "Not found." && /bin/false ) ++ @which python3 || ( echo "Not found." && /bin/false ) + @./check.py + + install: +--- a/check.py ++++ b/check.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # check.py -- check for system requirements + # public domain + +@@ -16,20 +16,20 @@ + except ImportError: + raise SystemExit("Not found.\n%s requires Pygame. (http://www.pygame.org)" % NAME) + +-print pygame.ver + "." ++print(pygame.ver + ".") + if pygame.ver < "1.6.2": + raise SystemExit("%s requires at least Pygame 1.6.2. (http://www.pygame.org)" % NAME) + + sys.stdout.write("Checking for pygame.surfarray: ") + try: + import pygame.surfarray +- print "found." ++ print("found.") + except (ImportError, NotImplementedError): + raise SystemExit("not found!\n%s requires the Pygame surfarray module." % NAME) + + if pygame.ver == "1.6.2": +- print """\n WARNING: ++ print("""\n WARNING: + Pygame 1.6.2 is supported, but has a buggy line-drawing algorithm. +- Crystals will be drawn incorrectly.""" +-print "\nYour system meets the requirements to install %s." % NAME +-print "Type 'make install' (as root) to install it." ++ Crystals will be drawn incorrectly.""") ++print("\nYour system meets the requirements to install %s." % NAME) ++print("Type 'make install' (as root) to install it.") diff -Nru angrydd-1.0.1/debian/patches/series angrydd-1.0.1/debian/patches/series --- angrydd-1.0.1/debian/patches/series 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/patches/series 2019-08-09 18:47:59.000000000 +0000 @@ -4,3 +4,4 @@ 04_bug406548.patch 05_bug402333.patch windowed-mode.patch +python3.patch diff -Nru angrydd-1.0.1/debian/rules angrydd-1.0.1/debian/rules --- angrydd-1.0.1/debian/rules 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/rules 2019-08-09 18:47:59.000000000 +0000 @@ -1,8 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --with python2 + dh $@ --with python3 override_dh_auto_install: $(MAKE) install DESTDIR=$(CURDIR)/debian/angrydd - diff -Nru angrydd-1.0.1/debian/watch angrydd-1.0.1/debian/watch --- angrydd-1.0.1/debian/watch 2018-10-28 16:24:19.000000000 +0000 +++ angrydd-1.0.1/debian/watch 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -version=4 -https://www.sacredchao.net/~piman/angrydd/ angrydd-(.*)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))