86>Apr 16 03:39:51 userdel[1925193]: delete user 'rooter'
<86>Apr 16 03:39:51 userdel[1925193]: removed group 'rooter' owned by 'rooter'
<86>Apr 16 03:39:51 groupadd[1925211]: group added to /etc/group: name=rooter, GID=963
<86>Apr 16 03:39:51 groupadd[1925211]: group added to /etc/gshadow: name=rooter
<86>Apr 16 03:39:51 groupadd[1925211]: new group: name=rooter, GID=963
<86>Apr 16 03:39:51 useradd[1925229]: new user: name=rooter, UID=963, GID=963, home=/root, shell=/bin/bash
<86>Apr 16 03:39:51 userdel[1925248]: delete user 'builder'
<86>Apr 16 03:39:51 userdel[1925248]: removed group 'builder' owned by 'builder'
<86>Apr 16 03:39:51 groupadd[1925269]: group added to /etc/group: name=builder, GID=964
<86>Apr 16 03:39:51 groupadd[1925269]: group added to /etc/gshadow: name=builder
<86>Apr 16 03:39:51 groupadd[1925269]: new group: name=builder, GID=964
<86>Apr 16 03:39:51 useradd[1925289]: new user: name=builder, UID=964, GID=964, home=/usr/src, shell=/bin/bash
<13>Apr 16 03:39:52 rpmi: mpdecimal-2.5.1-alt1 sisyphus+291245.40.54.1 1643293464 installed
<13>Apr 16 03:39:52 rpmi: libgdbm-1.8.3-alt10 sisyphus+278100.1600.1.1 1626059138 installed
<13>Apr 16 03:39:52 rpmi: libexpat-2.4.7-alt1 sisyphus+296417.100.1.1 1646812526 installed
<13>Apr 16 03:39:52 rpmi: libp11-kit-0.24.1-alt1 sisyphus+293720.100.1.1 1642535281 installed
<13>Apr 16 03:39:52 rpmi: libtasn1-4.18.0-alt1 sisyphus+294217.100.3.1 1643755527 installed
<13>Apr 16 03:39:52 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+278157.100.2.1 1626055790 installed
<13>Apr 16 03:39:52 rpmi: alternatives-0.5.1-alt1 sisyphus+278157.100.2.1 1626055790 installed
<13>Apr 16 03:39:52 rpmi: ca-certificates-2022.04.01-alt1 sisyphus+297635.100.1.1 1648830809 installed
<13>Apr 16 03:39:52 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed
<13>Apr 16 03:39:52 rpmi: p11-kit-trust-0.24.1-alt1 sisyphus+293720.100.1.1 1642535281 installed
<13>Apr 16 03:39:52 rpmi: libcrypto1.1-1.1.1n-alt2 sisyphus+297394.100.2.1 1648745164 installed
<13>Apr 16 03:39:52 rpmi: libssl1.1-1.1.1n-alt2 sisyphus+297394.100.2.1 1648745164 installed
<13>Apr 16 03:39:52 rpmi: python3-3.10.4-alt1 sisyphus+297487.100.1.1 1648620133 installed
<13>Apr 16 03:39:53 rpmi: python3-base-3.10.4-alt1 sisyphus+297487.100.1.1 1648620133 installed
<13>Apr 16 03:39:53 rpmi: tests-for-installed-python3-pkgs-0.1.18-alt1 sisyphus+290420.100.1.1 1637593698 installed
<13>Apr 16 03:39:53 rpmi: rpm-build-python3-0.1.18-alt1 sisyphus+290420.100.1.1 1637593698 installed
<13>Apr 16 03:39:54 rpmi: libpython-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python2-base-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-encodings-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-compiler-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-email-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-unittest-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-ctypes-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-multiprocessing-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: python-modules-logging-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
<13>Apr 16 03:39:54 rpmi: libgdbm-devel-1.8.3-alt10 sisyphus+278100.1600.1.1 1626059138 installed
<13>Apr 16 03:39:54 rpmi: perl-devel-1:5.34.0-alt1 sisyphus+279621.700.1.1 1626630195 installed
<13>Apr 16 03:39:54 rpmi: swig-data-1:4.0.2-alt3 sisyphus+296377.100.1.1 1646737046 installed
<13>Apr 16 03:39:54 rpmi: swig-1:4.0.2-alt3 sisyphus+296377.100.1.1 1646737322 installed
<13>Apr 16 03:39:54 rpmi: python-tools-2to3-2.7.18-alt9 sisyphus+296565.100.1.1 1647092089 installed
Building target platforms: i586
Building for target i586
Wrote: /usr/src/in/nosrpm/python3-module-elements-0.13-alt2.nosrc.rpm (w1.gzdio)
<13>Apr 16 03:39:56 rpmi: python3-module-pkg_resources-1:62.0.0-alt1 sisyphus+297628.2400.4.1 1649344543 installed
<13>Apr 16 03:39:56 rpmi: libpython3-3.10.4-alt1 sisyphus+297487.100.1.1 1648620133 installed
<13>Apr 16 03:39:56 rpmi: libncurses-6.3.20211106-alt2 sisyphus+294456.100.3.1 1643966459 installed
<13>Apr 16 03:39:56 rpmi: libtinfo-devel-6.3.20211106-alt2 sisyphus+294456.100.3.1 1643966459 installed
<13>Apr 16 03:39:56 rpmi: libncurses-devel-6.3.20211106-alt2 sisyphus+294456.100.3.1 1643966459 installed
<13>Apr 16 03:39:56 rpmi: python3-dev-3.10.4-alt1 sisyphus+297487.100.1.1 1648620133 installed
<13>Apr 16 03:39:56 rpmi: python3-module-setuptools-1:62.0.0-alt1 sisyphus+297628.2400.4.1 1649344543 installed
Installing python3-module-elements-0.13-alt2.src.rpm
Building target platforms: i586
Building for target i586
Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.44821
+ umask 022
+ /bin/mkdir -p /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf python3-module-elements-0.13
+ echo 'Source #0 (python3-module-elements-0.13.tar):'
Source #0 (python3-module-elements-0.13.tar):
+ /bin/tar -xf /usr/src/RPM/SOURCES/python3-module-elements-0.13.tar
+ cd python3-module-elements-0.13
+ /bin/chmod -c -Rf u+rwX,go-w .
+ echo 'Patch #0 (fix-mixed-tabs-and-spaces.patch):'
Patch #0 (fix-mixed-tabs-and-spaces.patch):
+ /usr/bin/patch -p1
patching file elements/drawing.py
+ sed -i elements/elements.py -e 1d
+ find -type f -name '*.py' -exec 2to3 -w -n '{}' +
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No changes to ./setup.py
RefactoringTool: Refactored ./misc/environ.py
RefactoringTool: Refactored ./misc/box2d_testscripts/speedtest.py
RefactoringTool: Refactored ./misc/box2d_testscripts/elements/tools_poly.py
RefactoringTool: Refactored ./misc/box2d_testscripts/elements/elements.py
--- ./misc/environ.py (original)
+++ ./misc/environ.py (refactored)
@@ -1,4 +1,4 @@
from os import environ
-for param in environ.keys():
- print "%20s %s" % (param, environ[param])
+for param in list(environ.keys()):
+ print("%20s %s" % (param, environ[param]))
--- ./misc/box2d_testscripts/speedtest.py (original)
+++ ./misc/box2d_testscripts/speedtest.py (refactored)
@@ -97,14 +97,14 @@
self.logf.close()
def main():
- print "Box2D & Elements Speed Test Skeleton"
- print " [1] ....... add 20 balls"
- print " [2] ....... add 20 rectangles"
- print " [space] ... toggles drawing on/off"
- print
+ print("Box2D & Elements Speed Test Skeleton")
+ print(" [1] ....... add 20 balls")
+ print(" [2] ....... add 20 rectangles")
+ print(" [space] ... toggles drawing on/off")
+ print()
if len(argv) == 1:
- print "> please start with 'python %s [logfile]'" % argv[0]
+ print("> please start with 'python %s [logfile]'" % argv[0])
exit(1)
# PyGame Init
@@ -149,12 +149,12 @@
else:
capt.log("Drawing set to [OFF]")
- elif event.unicode == "1":
+ elif event.str == "1":
if adder == None:
adder = add_things(6, False, world.add_ball)
adder.start()
- elif event.unicode == "2":
+ elif event.str == "2":
if adder == None:
adder = add_things(6, True, world.add_rect)
adder.start()
--- ./misc/box2d_testscripts/elements/tools_poly.py (original)
+++ ./misc/box2d_testscripts/elements/tools_poly.py (refactored)
@@ -78,7 +78,7 @@
l = sqrt((vx*vx) + (vy*vy))
# normalize vector
- print l
+ print(l)
if l == 0.0:
return False
@@ -101,20 +101,20 @@
alpha_min = alpha
vectors.append((vx, vy))
- print vectors[-1], "alpha=", alpha
+ print(vectors[-1], "alpha=", alpha)
# print alpha
# print ">> ", x_sum, y_sum
alpha_min = fabs(alpha_min)
alpha_max = fabs(alpha_max)
- print ">> alpha min, max:", alpha_min, alpha_max
+ print(">> alpha min, max:", alpha_min, alpha_max)
# get diff
if alpha_max > alpha_min:
alpha_diff = fabs(alpha_max - alpha_min)
else:
alpha_diff = fabs(alpha_min - alpha_max)
- print ">> alpha_diff:", alpha_diff
+ print(">> alpha_diff:", alpha_diff)
if alpha_diff < 25.0:
return True
--- ./misc/box2d_testscripts/elements/elements.py (original)
+++ ./misc/box2d_testscripts/elements/elements.py (refactored)
@@ -29,8 +29,8 @@
from math import fabs, sqrt, atan, degrees
from random import shuffle
-import tools_poly
-import drawing
+from . import tools_poly
+from . import drawing
# Part for loading the appropriate lib for the current platform
from platform import architecture
@@ -38,7 +38,7 @@
s = platformsystem()
arch, arch2 = architecture()
-print "Loading box2d for %s (%s)" % (s, arch)
+print("Loading box2d for %s (%s)" % (s, arch))
if s == 'Linux':
if arch == "64bit":
@@ -192,7 +192,7 @@
self.drawer.draw_polygon(surface, clr, points, 2)
else:
- print " unknown shape type:%d" % shape.GetType()
+ print(" unknown shape type:%d" % shape.GetType())
shape = shape.GetNext()
@@ -341,7 +341,7 @@
NOTE: Box2D has a maximum poly vertex count, defined in Common/box2d.b2Settings.h (box2d.b2_maxPolygonVertices)
We need to make sure, that we reach that by reducing the poly with increased tolerance
"""
- print
+ print()
# Reduce Polygon
tolerance = 20
@@ -351,13 +351,13 @@
v_new = tools_poly.reduce_poly(vertices, tolerance)
vertices = v_new
RefactoringTool: No changes to ./misc/box2d_testscripts/elements/drawing.py
RefactoringTool: Refactored ./misc/box2d_testscripts/elements/__init__.py
RefactoringTool: Refactored ./ez_setup.py
- print "Polygon reduced to %i vertices | tolerance: %i" % (len(vertices), tolerance)
+ print("Polygon reduced to %i vertices | tolerance: %i" % (len(vertices), tolerance))
""" Problem: Straight lines will crash the Box2D engine.
How to detect 'straight' lines. We try by comparing the vectors. (tools_poly.py)
"""
if tools_poly.is_line(vertices):
- print "IS LINE"
+ print("IS LINE")
x1, y1 = vertices[0]
x2, y2 = vertices[-1]
@@ -384,8 +384,8 @@
vertices.append((x2, y2))
vertices.append(p2)
vertices.append(p1)
- print "normal vector = (%.4f, %.4f)" % (vnx, vny)
- print "%i vertices" % (len(vertices))
+ print("normal vector = (%.4f, %.4f)" % (vnx, vny))
+ print("%i vertices" % (len(vertices)))
# So poly should be alright
# Continue reducing the vertecs
--- ./misc/box2d_testscripts/elements/__init__.py (original)
+++ ./misc/box2d_testscripts/elements/__init__.py (refactored)
@@ -1 +1 @@
-from elements import *
+from .elements import *
--- ./ez_setup.py (original)
+++ ./ez_setup.py (refactored)
@@ -62,10 +62,10 @@
if egg_name in md5_data:
digest = md5(data).hexdigest()
if digest != md5_data[egg_name]:
- print >>sys.stderr, (
+ print((
"md5 validation of %s failed! (Possible download problem?)"
% egg_name
- )
+ ), file=sys.stderr)
sys.exit(2)
return data
@@ -95,14 +95,14 @@
return do_download()
try:
pkg_resources.require("setuptools>="+version); return
- except pkg_resources.VersionConflict, e:
+ except pkg_resources.VersionConflict as e:
if was_imported:
- print >>sys.stderr, (
+ print((
"The required version of setuptools (>=%s) is not available, and\n"
"can't be installed while this script is running. Please install\n"
" a more recent version first, using 'easy_install -U setuptools'."
"\n\n(Currently using %r)"
- ) % (version, e.args[0])
+ ) % (version, e.args[0]), file=sys.stderr)
sys.exit(2)
else:
del pkg_resources, sys.modules['pkg_resources'] # reload ok
@@ -121,7 +121,7 @@
with a '/'). `to_dir` is the directory where the egg will be downloaded.
`delay` is the number of seconds to pause before an actual download attempt.
"""
- import urllib2, shutil
+ import urllib.request, urllib.error, urllib.parse, shutil
egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
url = download_base + egg_name
saveto = os.path.join(to_dir, egg_name)
@@ -147,7 +147,7 @@
version, download_base, delay, url
); from time import sleep; sleep(delay)
log.warn("Downloading %s", url)
- src = urllib2.urlopen(url)
+ src = urllib.request.urlopen(url)
# Read/write all in one block, so we don't create a corrupt file
# if the download is interrupted.
data = _validate_md5(egg_name, src.read())
@@ -208,10 +208,10 @@
os.unlink(egg)
else:
if setuptools.__version__ == '0.0.1':
- print >>sys.stderr, (
+ print((
"You have an obsolete version of setuptools installed. Please\n"
"remove it from your system entirely before rerunning this script."
- )
+ ), file=sys.stderr)
sys.exit(2)
req = "setuptools>="+version
@@ -230,8 +230,8 @@
from setuptools.command.easy_install import main
main(argv)
else:
- print "Setuptools version",version,"or greater has been installed."
- print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
+ print("Setuptools version",version,"RefactoringTool: Refactored ./elements/elements.py
or greater has been installed.")
+ print('(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)')
def update_md5(filenames):
"""Update our built-in md5 registry"""
@@ -244,7 +244,7 @@
md5_data[base] = md5(f.read()).hexdigest()
f.close()
- data = [" %r: %r,\n" % it for it in md5_data.items()]
+ data = [" %r: %r,\n" % it for it in list(md5_data.items())]
data.sort()
repl = "".join(data)
@@ -254,7 +254,7 @@
match = re.search("\nmd5_data = {\n([^}]+)}", src)
if not match:
- print >>sys.stderr, "Internal error!"
+ print("Internal error!", file=sys.stderr)
sys.exit(2)
src = src[:match.start(1)] + repl + src[match.end(1):]
--- ./elements/elements.py (original)
+++ ./elements/elements.py (refactored)
@@ -31,25 +31,25 @@
try:
import Box2D as box2d
except:
- print 'Could not load the pybox2d library (Box2D).'
- print 'Please run "setup.py install" to install the dependencies.'
- print
- print 'Alternatively, recompile pybox2d for your system and python version.'
- print "See http://code.google.com/p/pybox2d"
+ print('Could not load the pybox2d library (Box2D).')
+ print('Please run "setup.py install" to install the dependencies.')
+ print()
+ print('Alternatively, recompile pybox2d for your system and python version.')
+ print("See http://code.google.com/p/pybox2d")
exit()
# Standard Imports
from random import shuffle
# Load Elements Definitions
-from locals import *
+from .locals import *
# Load Elements Modules
-import tools
-import drawing
-import add_objects
-import callbacks
-import camera
+from . import tools
+from . import drawing
+from . import add_objects
+from . import callbacks
+from . import camera
# Main Class
class Elements:
@@ -353,7 +353,7 @@
self.renderer.draw_polygon(clr, points)
else:
- print " unknown shape type:%d" % shape.GetType()
+ print(" unknown shape type:%d" % shape.GetType())
for joint in self.world.jointList:
@@ -384,7 +384,7 @@
self.mouseJoint.SetTarget((x,y))
def pickle_save(self, fn, additional_vars={}):
- import cPickle as pickle
+ import pickle as pickle
self.add.remove_mouseJoint()
if not additional_vars and hasattr(self, '_pickle_vars'):
@@ -394,11 +394,11 @@
try:
pickle.dump(save_values, open(fn, 'wb'))
- except Exception, s:
- print 'Pickling failed: ', s
+ except Exception as s:
+ print('Pickling failed: ', s)
return
- print 'Saved to %s' % fn
+ print('Saved to %s' % fn)
def pickle_load(self, fn, set_vars=True, additional_vars=[]):
"""
@@ -406,26 +406,26 @@
additional_vars is a dictionary to be populated with the
loaded variables.
"""
- import cPickle as pickle
+ import pickle as pickle
try:
world, variables = pickle.load(open(fn, 'rb'))
world = world._pickle_finalize()
variables = box2d.pickle_fix(world, variables, 'load')
- except Exception, s:
- print 'Error while loading world: ', s
+ except Exception as s:
+ print('Error while loading world: ', s)
return
self.world = world
if set_vars:
# reset the additional saved variables:
- for var, value in variables.items():
+ for var, value in list(variables.items()):
if hasattr(self, var):
setattr(self, var, value)
else:
- print 'Unknown property %s=%s' % (var, value)
-
- print 'Loaded from %s' % fn
+ print('Unknown property %s=%s' % (var, value))
+
+ print('Loaded from %s' % fn)
return variables
@@ -534,7 +534,7 @@
#_logger.debug(newBody)
newBody.angularVeRefactoringTool: Refactored ./elements/drawing.py
RefactoringTool: Refactored ./elements/tools_poly.py
RefactoringTool: No changes to ./elements/tools.py
RefactoringTool: Refactored ./elements/menu.py
RefactoringTool: No changes to ./elements/locals.py
RefactoringTool: Refactored ./elements/camera.py
locity = body['angularVelocity']
newBody.linearVelocity = body['linearVelocity']
- if body.has_key('shapes'):
+ if 'shapes' in body:
for shape in body['shapes']:
if shape['type'] == 'polygon':
polyDef = box2d.b2PolygonDef()
@@ -576,7 +576,7 @@
jointDef.maxMotorTorque = joint['maxMotorTorque']
self.world.CreateJoint(jointDef)
- for (k,v) in worldmodel['additional_vars'].items():
+ for (k,v) in list(worldmodel['additional_vars'].items()):
additional_vars[k] = v
for body in self.world.GetBodyList():
--- ./elements/drawing.py (original)
+++ ./elements/drawing.py (refactored)
@@ -29,7 +29,7 @@
from math import sin
from math import sqrt
-import tools
+from . import tools
# Functions of a rendering class
# mandatory:
@@ -69,7 +69,7 @@
Return: Class draw_pygame()
"""
- print "* Pygame selected as renderer"
+ print("* Pygame selected as renderer")
from pygame import draw
from pygame import Rect
@@ -166,7 +166,7 @@
Return: Class draw_cairo()
"""
- print "* Cairo selected as renderer"
+ print("* Cairo selected as renderer")
import cairo
self.cairo = cairo
self.set_drawing_method(drawMethod)
@@ -184,7 +184,7 @@
"""
self.da = da
self.window = da.window
- print "* Cairo renderer drawing area set"
+ print("* Cairo renderer drawing area set")
def set_drawing_method(self, type):
""" type = filled, image """
@@ -322,7 +322,7 @@
surface .... not used with pyglet
lineWidth ..
"""
- print "* OpenGL_Pyglet selected as renderer"
+ print("* OpenGL_Pyglet selected as renderer")
from pyglet import gl
self.gl = gl
--- ./elements/tools_poly.py (original)
+++ ./elements/tools_poly.py (refactored)
@@ -32,8 +32,8 @@
from math import degrees
from math import acos
-from locals import *
-from elements import box2d
+from .locals import *
+from .elements import box2d
def calc_center(points):
""" Calculate the center of a polygon
@@ -107,7 +107,7 @@
# Get maximum difference
alpha_diff = fabs(alphas[-1] - alphas[0])
- print "alpha difference:", alpha_diff
+ print("alpha difference:", alpha_diff)
if alpha_diff < tolerance:
return True
@@ -134,7 +134,7 @@
dir = None
is_convex = True
- for i in xrange(len(vertices)-1):
+ for i in range(len(vertices)-1):
if i == 0:
p_old = vertices[i]
continue
@@ -165,7 +165,7 @@
angle = degrees(acos(a / (b*c)))
except:
# cos=1.0
- print "cos=", a/(b*c)
+ print("cos=", a/(b*c))
continue
# Check if inside tolerance
--- ./elements/menu.py (original)
+++ ./elements/menu.py (refactored)
@@ -27,7 +27,7 @@
import pygame
from pygame.locals import *
-import tools
+from . import tools
COLOR_HEX_BLUE1 = "6491a4"
COLOR_HEX_BLUE2 = "9ec9ff"
@@ -151,7 +151,7 @@
focus_in = self.focus
found = False
- for i in xrange(len(self.items)):
+ for i in range(len(self.items)):
item = self.items[i]
if item.pos_inside(pos):
found = True
@@ -186,7 +186,7 @@
surface.blit(s, (0,0))
- for i in xrange(len(self.items)):
+ for i in range(len(self.items)):
item = self.items[i]
if not item.parent:
x,y,w,h = item.rect
--- ./elements/camera.py (original)
+++ ./elements/camera.py (refactored)
@@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-from locals import *
+from .locals import *
class Camera:
""" The Camera class. We willRefactoringTool: Refactored ./elements/callbacks.py
RefactoringTool: Refactored ./elements/add_objects.py
RefactoringTool: Refactored ./elements/__init__.py
RefactoringTool: Refactored ./documentation/dynamic/add_comment.py
see :)
--- ./elements/callbacks.py (original)
+++ ./elements/callbacks.py (refactored)
@@ -24,8 +24,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-from locals import *
-from elements import box2d
+from .locals import *
+from .elements import box2d
class CallbackHandler:
# List of contact callbacks and shapes to start them - sorted by type for quicker access
@@ -37,7 +37,7 @@
# init callback dict to avoid those slow try
# (especially for self.get, as it is called *often*)
- for i in xrange(10):
+ for i in range(10):
self.callbacks[i] = []
def add(self, callback_type, callback_handler, *args):
@@ -56,7 +56,7 @@
if self.parent.listener == None:
self.parent.listener = kContactListener(self.get)
self.parent.world.SetContactListener( self.parent.listener )
- print "* ContactListener added"
+ print("* ContactListener added")
# Get callback dict for this callback_type
c = self.callbacks[callback_type]
--- ./elements/add_objects.py (original)
+++ ./elements/add_objects.py (refactored)
@@ -24,15 +24,15 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
"""
-from locals import *
-from elements import box2d
+from .locals import *
+from .elements import box2d
# Imports
from math import pi
from math import sqrt
from math import asin
-import tools_poly
+from . import tools_poly
class Add:
element_count = 0
@@ -347,7 +347,7 @@
try:
polyDef.checkValues()
except ValueError:
- print "concavePoly: Created an invalid polygon!"
+ print("concavePoly: Created an invalid polygon!")
return None
body.CreateShape(polyDef)
@@ -390,14 +390,14 @@
if tools_poly.is_line(vertices):
# Lines shall be drawn by self.concavePoly(...)
- print "is line"
+ print("is line")
is_convex = False
if is_convex:
- print "convex"
+ print("convex")
return self.convexPoly(vertices, dynamic, density, restitution, friction), vertices
else:
- print "concave"
+ print("concave")
return self.concavePoly(vertices, dynamic, density, restitution, friction), vertices
@@ -421,7 +421,7 @@
tolerance += 1
v_new = tools_poly.reduce_poly(vertices, tolerance)
- print "convexPoly: Polygon reduced from %i to %i vertices | tolerance: %i" % (len(vertices), len(v_new), tolerance)
+ print("convexPoly: Polygon reduced from %i to %i vertices | tolerance: %i" % (len(vertices), len(v_new), tolerance))
vertices = v_new
# So poly should be alright now
@@ -448,7 +448,7 @@
return pt
def joint(self, *args):
- print "* Add Joint:", args
+ print("* Add Joint:", args)
if len(args) == 4:
# Distance Joint
--- ./elements/__init__.py (original)
+++ ./elements/__init__.py (refactored)
@@ -1,2 +1,2 @@
__all__ = ['locals', 'menu']
-from elements import Elements
+from .elements import Elements
--- ./documentation/dynamic/add_comment.py (original)
+++ ./documentation/dynamic/add_comment.py (refactored)
@@ -7,18 +7,18 @@
from sys import exit
from os import system
-from urllib2 import urlopen
+from urllib.request import urlopen
testonly = False
if len(argv) < 2:
- print "please add filename of reference html"
+ print("please add filename of reference html")
exit(0)
if len(argv) == 3:
testonly = True
-print testonly
+print(testonly)
blueprint = open("comment_blueprint.html").read().strip()
blueprint_onlyadd RefactoringTool: Refactored ./demos/sandbox.py
RefactoringTool: Refactored ./demos/demo9_contactsound.py
RefactoringTool: Refactored ./demos/demo8_contact.py
RefactoringTool: Refactored ./demos/demo7_poly.py
RefactoringTool: Refactored ./demos/demo6_walls.py
= open("comment_blueprint_onlyadd.html").read().strip()
@@ -71,4 +71,4 @@
system("rm ../test.html")
else:
- print c_orig
+ print(c_orig)
--- ./demos/sandbox.py (original)
+++ ./demos/sandbox.py (refactored)
@@ -53,7 +53,7 @@
elif event.type == MOUSEBUTTONDOWN and event.button == 1:
# Add Mouse Joint if at an Object
bodylist = world.get_bodies_at_pos(event.pos, include_static=False)
- print bodylist
+ print(bodylist)
if bodylist and len(bodylist) > 0:
world.add.mouseJoint(bodylist[0], event.pos)
@@ -70,13 +70,13 @@
a += 10
elif event.type == KEYDOWN:
- if event.unicode == "1":
+ if event.str == "1":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
for j in range(5): world.add.ball((x-i,y-j), radius=20)
- elif event.unicode == "2":
+ elif event.str == "2":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
--- ./demos/demo9_contactsound.py (original)
+++ ./demos/demo9_contactsound.py (refactored)
@@ -30,9 +30,9 @@
try:
sound = pygame.mixer.Sound(fullname)
- except pygame.error, message:
- print 'Cannot load sound:', fullname
- raise SystemExit, message
+ except pygame.error as message:
+ print('Cannot load sound:', fullname)
+ raise SystemExit(message)
return sound
@@ -63,7 +63,7 @@
#pygame takes care of the rest
if vol != None:
self.snd[self.cur_sound].set_volume(vol)
- print "volume: ", vol
+ print("volume: ", vol)
self.snd[self.cur_sound].play()
self.cur_sound += 1
--- ./demos/demo8_contact.py (original)
+++ ./demos/demo8_contact.py (refactored)
@@ -21,16 +21,16 @@
from elements.locals import *
def contact_add(c):
- print "Any Contact"
+ print("Any Contact")
# print c
# print c.normalForce
# print c.tangentForce
def contact_add_ball(c):
- print "Contact with Ball"
+ print("Contact with Ball")
def contact_add_poly(c):
- print "Polygon Contact"
+ print("Polygon Contact")
def main():
# PyGame Init
@@ -86,8 +86,8 @@
draw_poly = False
points.append(event.pos)
if len(points) > 2:
- print points
- print len(points)
+ print(points)
+ print(len(points))
body = world.add.complexPoly(points)
world.callbacks.add(CALLBACK_CONTACT_ADD, contact_add_poly, body)
else:
--- ./demos/demo7_poly.py (original)
+++ ./demos/demo7_poly.py (refactored)
@@ -68,8 +68,8 @@
draw_poly = False
points.append(event.pos)
if len(points) > 2:
- print points
- print len(points)
+ print(points)
+ print(len(points))
world.add.complexPoly(points)
else:
world.add.rect(event.pos, width=80, height=30)
--- ./demos/demo6_walls.py (original)
+++ ./demos/demo6_walls.py (refactored)
@@ -57,16 +57,16 @@
world.add.rect(event.pos, width=50, height=20)
elif event.type == KEYDOWN:
- if event.unicode == "s":
+ if event.str == "s":
show = not show
- elif event.unicode == "1":
+ elif event.str == "1":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
for j in range(5): world.add.ball((x-i,y-j), 20RefactoringTool: Refactored ./demos/demo5_addmany.py
RefactoringTool: No changes to ./demos/demo4_api.py
RefactoringTool: Refactored ./demos/demo15_menu.py
RefactoringTool: Refactored ./demos/demo14_camera.py
)
- elif event.unicode == "2":
+ elif event.str == "2":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
--- ./demos/demo5_addmany.py (original)
+++ ./demos/demo5_addmany.py (refactored)
@@ -56,13 +56,13 @@
world.add.rect(event.pos, width=40, height=20)
elif event.type == KEYDOWN:
- if event.unicode == "1":
+ if event.str == "1":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
for j in range(5): world.add.ball((x-i,y-j), radius=20)
- elif event.unicode == "2":
+ elif event.str == "2":
# Add many Balls
x, y = pygame.mouse.get_pos()
for i in range(5):
--- ./demos/demo15_menu.py (original)
+++ ./demos/demo15_menu.py (refactored)
@@ -26,7 +26,7 @@
from elements.menu import *
def click_menu(*args):
- print "Menu Click:", args
+ print("Menu Click:", args)
if args[0] == "Quit":
exit(0)
@@ -54,7 +54,7 @@
# Save Image
pygame.image.save(s, "%s%i.tga" % (fn, i))
- print "Screenshot saved as: %s%i.tga" % (fn, i)
+ print("Screenshot saved as: %s%i.tga" % (fn, i))
def main():
# PyGame Init
@@ -121,10 +121,10 @@
# Pause with SPACE
world.run_physics = not world.run_physics
- elif event.unicode == "+":
+ elif event.str == "+":
world.camera.inc_scale_factor(+0.1)
- elif event.unicode == "-":
+ elif event.str == "-":
world.camera.inc_scale_factor(-0.1)
elif event.key in [271, 13]:
@@ -168,7 +168,7 @@
if jb2:
if str(jb1[0]) != str(jb2[0]):
- print "- Add Joint between:", jb1[0], jb2[0]
+ print("- Add Joint between:", jb1[0], jb2[0])
world.add.joint(jb1[0], jb2[0], points[0], points[-1])
draw_poly = False
continue
--- ./demos/demo14_camera.py (original)
+++ ./demos/demo14_camera.py (refactored)
@@ -29,18 +29,18 @@
# print c.tangentForce
def contact_add_ball(c):
- print "Contact with Ball"
+ print("Contact with Ball")
def contact_add_poly(c):
- print "Polygon Contact"
+ print("Polygon Contact")
def main():
- print "(i) Arrow Keys: Move around (change offset)"
- print "(i) Draw a line between two bodies to create a distance joint"
- print "(i) Middle Mouse Button or [Enter] sets the position as center"
- print "(i) Right mouse button to follow a body"
+ print("(i) Arrow Keys: Move around (change offset)")
+ print("(i) Draw a line between two bodies to create a distance joint")
+ print("(i) Middle Mouse Button or [Enter] sets the position as center")
+ print("(i) Right mouse button to follow a body")
#print "(i) Press [+] to zoom in, [-] to zoom out"
- print
+ print()
# PyGame Init
pygame.init()
@@ -90,10 +90,10 @@
# Pause with SPACE
world.run_physics = not world.run_physics
- elif event.unicode == "+":
+ elif event.str == "+":
world.camera.inc_scale_factor(+0.1)
- elif event.unicode == "-":
+ elif event.str == "-":
world.camera.inc_scale_factor(-0.1)
elif event.key in [271, 13]:
@@ -134,7 +134,7 @@
if jb2:
if str(jb1[0]) != str(jb2[0]):
- print "- Add Joint between:", jb1[0], jb2[0]
+ RefactoringTool: Refactored ./demos/demo13_joints1.py
RefactoringTool: No changes to ./demos/demo12_opengl_pyglet.py
RefactoringTool: Refactored ./demos/demo11a_cairo_images.py
RefactoringTool: Refactored ./demos/demo11_cairo.py
RefactoringTool: Refactored ./contrib/menno/rendering2.py
print("- Add Joint between:", jb1[0], jb2[0])
world.add.joint(jb1[0], jb2[0], points[0], points[-1])
draw_poly = False
continue
--- ./demos/demo13_joints1.py (original)
+++ ./demos/demo13_joints1.py (refactored)
@@ -29,13 +29,13 @@
# print c.tangentForce
def contact_add_ball(c):
- print "Contact with Ball"
+ print("Contact with Ball")
def contact_add_poly(c):
- print "Polygon Contact"
+ print("Polygon Contact")
def main():
- print "(i) Draw a line between two bodies to create a distance joint"
+ print("(i) Draw a line between two bodies to create a distance joint")
# PyGame Init
pygame.init()
@@ -96,8 +96,8 @@
if jb2:
if str(jb1) != str(jb2):
- print jb1, jb2
- print "add joint"
+ print(jb1, jb2)
+ print("add joint")
world.add.joint(jb1[0], jb2[0], points[0], points[-1])
draw_poly = False
continue
--- ./demos/demo11a_cairo_images.py (original)
+++ ./demos/demo11a_cairo_images.py (refactored)
@@ -35,13 +35,13 @@
pass
def contact_add_ball(self, c):
- print "Contact with Ball"
+ print("Contact with Ball")
def contact_add_poly(self, c):
- print "Polygon Contact"
+ print("Polygon Contact")
def destroy(self, widget, data=None):
- print "Quitting..."
+ print("Quitting...")
gtk.main_quit()
def keydown(self, widget, event):
@@ -63,7 +63,7 @@
def mousedown(self, widget, event):
pos = (event.x, event.y)
- print pos
+ print(pos)
#return
if event.button == 3:
self.world.add.triangle(pos, sidelength=50)
@@ -90,7 +90,7 @@
self.world.add.rect(pos, width=80, height=30)
def __init__(self, size = (640, 480)):
- print "Initializing the window..."
+ print("Initializing the window...")
# Create a new window
self.window = win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.set_title("Demo 11 - Using GTK+/Cairo")
@@ -203,7 +203,7 @@
sf.write_to_png(filenames[0])
# svg writing:
#sf.finish()
- print "Wrote smiley to", filenames[0]
+ print("Wrote smiley to", filenames[0])
w, h = 500, 100
border = w/5
@@ -222,7 +222,7 @@
c.stroke()
sf.write_to_png(filenames[1])
- print "Wrote test image to", filenames[1]
+ print("Wrote test image to", filenames[1])
# exit(0)
--- ./demos/demo11_cairo.py (original)
+++ ./demos/demo11_cairo.py (refactored)
@@ -35,13 +35,13 @@
pass
def contact_add_ball(self, c):
- print "Contact with Ball"
+ print("Contact with Ball")
def contact_add_poly(self, c):
- print "Polygon Contact"
+ print("Polygon Contact")
def destroy(self, widget, data=None):
- print "Quitting..."
+ print("Quitting...")
gtk.main_quit()
def keydown(self, widget, event):
@@ -63,7 +63,7 @@
def mousedown(self, widget, event):
pos = (event.x, event.y)
- print pos
+ print(pos)
#return
if event.button == 3:
self.world.add.triangle( pos, sidelength=50)
@@ -90,7 +90,7 @@
self.world.add.rect(pos, width=80, height=30)
def __init__(self, size = (640, 480)):
- print "Initializing the window..."
+ print("Initializing the window...")
# Create a new window
self.window = win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.set_title("Demo 11 - Using GTK+/Cairo")
--- ./contrib/menno/rendering2.py (original)
+++ ./contrib/menno/rendering2.py (refactored)
@@ -1,4 +1,4 @@
-from __future__ import division
+
from pyglet.gl import *
import pyglet
@@ -55,7 +55,7 @@
def genColor(self,r,g,bRefactoringTool: No changes to ./contrib/josh/Physics4.activity/scenes/mixer.py
RefactoringTool: No changes to ./contrib/josh/Physics4.activity/scenes/jumble.py
RefactoringTool: No changes to ./contrib/josh/Physics4.activity/scenes/default.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/physics.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/video.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/util.py
):
colors = []
- for n in xrange(self.segs):
+ for n in range(self.segs):
colors.extend([r,g,b,r,g,b,r,g,b])
self.colorGL = (GLfloat * len(colors))(*colors)
--- ./contrib/josh/Physics4.activity/physics.py (original)
+++ ./contrib/josh/Physics4.activity/physics.py (refactored)
@@ -77,7 +77,7 @@
from scenes.default import *
self.scene = Scene(self, screen)
except:
- print "ERROR: Problem while reading scene"
+ print("ERROR: Problem while reading scene")
def processEvent(self, event):
"""Process a single pygame event. This includes keystrokes
@@ -91,8 +91,8 @@
self.running = False
elif event.key == pygame.K_d:
self.render = not self.render
- print "Render:", self.render
- elif self.arrowkeys.has_key(event.key):
+ print("Render:", self.render)
+ elif event.key in self.arrowkeys:
direction = self.arrowkeys[event.key]
# if direction == pygame.K_UP:
@@ -137,18 +137,18 @@
self.world.DestroyJoint(self.mouseJoint)
self.mouseJoint = None
elif event.type == mesh.CONNECT:
- print "Connected to the mesh."
+ print("Connected to the mesh.")
elif event.type == mesh.PARTICIPANT_ADD:
buddy = mesh.get_buddy(event.handle)
if event.handle == mesh.my_handle():
- print "Me:", buddy.props.nick, buddy.props.color
+ print("Me:", buddy.props.nick, buddy.props.color)
else:
- print "Join:", buddy.props.nick, buddy.props.color
+ print("Join:", buddy.props.nick, buddy.props.color)
elif event.type == mesh.PARTICIPANT_REMOVE:
pass
elif event.type == mesh.MESSAGE_UNI or event.type == mesh.MESSAGE_MULTI:
buddy = mesh.get_buddy(event.handle)
- print "Message from %s / %s: %s" % (buddy.props.nick, event.handle, event.content)
+ print("Message from %s / %s: %s" % (buddy.props.nick, event.handle, event.content))
elif event.type == pygame.USEREVENT:
if event.action == 'scene-changed':
scenename = event.scene
@@ -156,12 +156,12 @@
exec("from scenes.%s import Scene" % scenename)
self.scene = Scene(self, self.screen)
except:
- print "ERROR: Problem while reading scene"
+ print("ERROR: Problem while reading scene")
raise
else:
- print "Unknown user event action:", event.action
+ print("Unknown user event action:", event.action)
else:
- print "Unknown event:", event
+ print("Unknown event:", event)
def run(self):
"""Run the main loop of the game."""
@@ -232,7 +232,7 @@
points.append([pt.x, pt.y])
pygame.draw.polygon(self.screen, (255,255,255), points, 1)
else:
- print " unknown shape type:%d" % shape.GetType()
+ print(" unknown shape type:%d" % shape.GetType())
shape = shape.GetNext()
--- ./contrib/josh/Physics4.activity/olpcgames/video.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/video.py (refactored)
@@ -75,7 +75,7 @@
def __init__( self ):
try:
window_id = pygame.display.get_wm_info()['window']
- except KeyError, err: # pygame-ctypes...
+ except KeyError as err: # pygame-ctypes...
window_id = int(os.environ['SDL_WINDOWID'])
self.window_id = window_id
self._imagesink = None
--- ./contrib/josh/Physics4.activity/olpcgames/util.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/util.py (refactored)
@@ -1,5 +1,5 @@
"""Abstraction layer for working outside the Sugar envirRefactoringTool: No changes to ./contrib/josh/Physics4.activity/olpcgames/svgsprite.py
RefactoringTool: No changes to ./contrib/josh/Physics4.activity/olpcgames/pausescreen.py
RefactoringTool: No changes to ./contrib/josh/Physics4.activity/olpcgames/pangofont.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/mesh.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/gtkEvent.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/eventwrap.py
onment"""
-import traceback, cStringIO
+import traceback, io
import logging
log = logging.getLogger( 'olpcgames.util' )
import os
@@ -59,7 +59,7 @@
)
"""
exception = str(error)
- file = cStringIO.StringIO()
+ file = io.StringIO()
try:
traceback.print_exc( limit=10, file = file )
exception = file.getvalue()
--- ./contrib/josh/Physics4.activity/olpcgames/mesh.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/mesh.py (refactored)
@@ -4,17 +4,17 @@
#log.setLevel( logging.DEBUG )
try:
from sugar.presence.tubeconn import TubeConnection
-except ImportError, err:
+except ImportError as err:
TubeConnection = object
try:
from dbus.gobject_service import ExportedGObject
-except ImportError, err:
+except ImportError as err:
ExportedGObject = object
from dbus.service import method, signal
try:
import telepathy
-except ImportError, err:
+except ImportError as err:
telepathy = None
class OfflineError( Exception ):
@@ -257,7 +257,7 @@
pservice = sugar.presence.presenceservice.get_instance()
try:
name, path = pservice.get_preferred_connection()
- except (TypeError,ValueError), err:
+ except (TypeError,ValueError) as err:
log.warn('Working in offline mode, cannot retrieve buddy information for %s: %s', handle, err )
raise OfflineError( """Unable to retrieve buddy information, currently offline""" )
else:
@@ -380,7 +380,7 @@
log.debug( 'get_participants' )
try:
return instance().ordered_bus_names[:]
- except IndexError, err:
+ except IndexError as err:
return [] # no participants yet, as we don't yet have a connection
def dbus_get_object(handle, path):
--- ./contrib/josh/Physics4.activity/olpcgames/gtkEvent.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/gtkEvent.py (refactored)
@@ -112,7 +112,7 @@
pygame.key.set_repeat = self._set_repeat
pygame.mouse.get_pressed = self._get_mouse_pressed
pygame.mouse.get_pos = self._get_mouse_pos
- import eventwrap
+ from . import eventwrap
eventwrap.install()
def _quit(self, data=None):
@@ -146,7 +146,7 @@
def _keymods(self):
"""Extract the keymods as they stand currently."""
mod = 0
- for key_val, mod_val in self.mod_map.iteritems():
+ for key_val, mod_val in self.mod_map.items():
mod |= self.__keystate[key_val] and mod_val
return mod
@@ -165,7 +165,7 @@
elif hasattr(pygame, 'K_'+key.lower()):
keycode = getattr(pygame, 'K_'+key.lower())
else:
- print 'Key %s unrecognized'%key
+ print('Key %s unrecognized'%key)
if keycode is not None:
if type == pygame.KEYDOWN:
@@ -173,10 +173,10 @@
self.__keystate[keycode] = type == pygame.KEYDOWN
if type == pygame.KEYUP:
mod = self._keymods()
- ukey = unichr(gtk.gdk.keyval_to_unicode(event.keyval))
+ ukey = chr(gtk.gdk.keyval_to_unicode(event.keyval))
if ukey == '\000':
ukey = ''
- evt = eventwrap.Event(type, key=keycode, unicode=ukey, mod=mod)
+ evt = eventwrap.Event(type, key=keycode, str=ukey, mod=mod)
assert evt.key, evt
self._post(evt)
return True
@@ -262,9 +262,9 @@
def _post(self, evt):
try:
eventwrap.post(evt)
- except pygame.error, e:
+ except pygame.error as e:
if str(e) == 'Event queue full':
- print "Event queue full!"
+ print("Event queue full!")
pass
else:
raise e
--- ./contrib/josh/Physics4.activity/olpcgames/eventwrap.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/eventwrap.py (refactored)
@@ -11,8 +11,8 @@
"""
import pygame
import gtk
-import Queue
-import thread
+import queue
+import _thread
import logging
log = logging.getLogger( 'olpcgaRefactoringTool: No changes to ./contrib/josh/Physics4.activity/olpcgames/data/sleeping_svg.py
RefactoringTool: No changes to ./contrib/josh/Physics4.activity/olpcgames/data/__init__.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/canvas.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/camera.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/activity.py
mes.eventwrap' )
@@ -48,11 +48,11 @@
# Event queue:
-g_events = Queue.Queue()
+g_events = queue.Queue()
# Set of blocked events as set by set
g_blocked = set()
-g_blockedlock = thread.allocate_lock()
+g_blockedlock = _thread.allocate_lock()
g_blockAll = False
def pump():
@@ -66,7 +66,7 @@
try:
while True:
eventlist.append(g_events.get(block=False))
- except Queue.Empty:
+ except queue.Empty:
pass
pygameEvents = pygame_get()
@@ -99,7 +99,7 @@
result = g_events.get(block=False)
_set_last_event_time()
return result
- except Queue.Empty:
+ except queue.Empty:
return Event(pygame.NOEVENT)
@@ -114,7 +114,7 @@
result = g_events.get(block=True, timeout=timeout)
_set_last_event_time()
return result
- except Queue.Empty, err:
+ except queue.Empty as err:
return None
def peek(types=None):
@@ -127,7 +127,7 @@
try:
while True:
g_events.get(block=False)
- except Queue.Empty:
+ except queue.Empty:
pass
def set_blocked(item):
@@ -185,7 +185,7 @@
# Strings are the exception because you can iterate over their chars
# -- yet, for all the purposes I've ever cared about, I want to treat
# a string as a scalar.
- if isinstance(obj, basestring):
+ if isinstance(obj, str):
return (obj,)
try:
# Except as noted above, if you can get an iter() from an object,
--- ./contrib/josh/Physics4.activity/olpcgames/canvas.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/canvas.py (refactored)
@@ -102,19 +102,19 @@
olpcgames.widget = olpcgames.WIDGET = self
try:
import sugar.activity.activity,os
- except ImportError, err:
+ except ImportError as err:
log.info( """Running outside Sugar""" )
else:
try:
os.chdir(sugar.activity.activity.get_bundle_path())
- except KeyError, err:
+ except KeyError as err:
pass
try:
try:
log.info( '''Running mainloop: %s''', fn )
fn()
- except Exception, err:
+ except Exception as err:
log.error(
"""Uncaught top-level exception: %s""",
util.get_traceback( err ),
--- ./contrib/josh/Physics4.activity/olpcgames/camera.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/camera.py (refactored)
@@ -90,7 +90,7 @@
try:
os.makedirs( path )
log.info( 'Created temporary directory: %s', path )
- except (OSError,IOError), err:
+ except (OSError,IOError) as err:
pass
else:
path = self.directory
@@ -134,7 +134,7 @@
finally:
try:
os.remove( filename )
- except (IOError,OSError), err:
+ except (IOError,OSError) as err:
pass
def snap_async( self, token=None ):
"""Snap a picture asynchronously generating event on success/failure
@@ -189,7 +189,7 @@
try:
image = self._load_and_clean( filename )
success = True
- except Exception, err:
+ except Exception as err:
success = False
image = None
else:
--- ./contrib/josh/Physics4.activity/olpcgames/activity.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/activity.py (refactored)
@@ -100,13 +100,13 @@
log.info( 'shared: %s, %s', args, kwargs )
try:
mesh.activity_shared(self)
- except Exception, err:
+ except Exception as err:
log.error( """Failure signaling activity sharing to mesh module: %s""", util.get_traceback(err) )
else:
log.info( 'mesh activity shared message sent, trying to grab focus' )
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/_cairoimage.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/olpcgames/__init__.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/elements.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/activity.py
RefactoringTool: Refactored ./contrib/josh/Physics4.activity/Box2D.py
try:
self._pgc.grab_focus()
- except Exception, err:
+ except Exception as err:
log.warn( 'Focus failed: %s', err )
else:
log.info( 'asserting focus' )
--- ./contrib/josh/Physics4.activity/olpcgames/_cairoimage.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/_cairoimage.py (refactored)
@@ -24,7 +24,7 @@
a = color[3]
else:
a = 255.0
- return map(_fixColorBase, (r,g,b,a) )
+ return list(map(_fixColorBase, (r,g,b,a) ))
def _fixColorBase( v ):
"""Return a properly clamped colour in floating-point space"""
@@ -53,6 +53,6 @@
(width,height),
format
) # there's the next
- except ValueError, err:
+ except ValueError as err:
err.args += (len(data), (width,height), width*height*4,format )
raise
--- ./contrib/josh/Physics4.activity/olpcgames/__init__.py (original)
+++ ./contrib/josh/Physics4.activity/olpcgames/__init__.py (refactored)
@@ -32,7 +32,7 @@
from olpcgames.canvas import *
try:
from olpcgames.activity import *
-except ImportError, err:
+except ImportError as err:
PyGameActivity = None
from olpcgames import camera
from olpcgames import pangofont
--- ./contrib/josh/Physics4.activity/elements.py (original)
+++ ./contrib/josh/Physics4.activity/elements.py (refactored)
@@ -63,7 +63,7 @@
self.display_width = w
self.display_height = h
except:
- print "Elements Error: Please start pygame.init() before loading Elements Physics"
+ print("Elements Error: Please start pygame.init() before loading Elements Physics")
exit(0)
def update(self, fps=50.0, iterations=10):
@@ -99,7 +99,7 @@
pygame.draw.polygon(surface, (0,0,0), points, 1)
else:
- print " unknown shape type:%d" % shape.GetType()
+ print(" unknown shape type:%d" % shape.GetType())
shape = shape.GetNext()
body = body.GetNext()
--- ./contrib/josh/Physics4.activity/activity.py (original)
+++ ./contrib/josh/Physics4.activity/activity.py (refactored)
@@ -43,5 +43,5 @@
return toolbar
def _scene_changed_cb(self, combo):
- print "Scene change:", combo.props.value
+ print("Scene change:", combo.props.value)
pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action='scene-changed', scene=combo.props.value))
--- ./contrib/josh/Physics4.activity/Box2D.py (original)
+++ ./contrib/josh/Physics4.activity/Box2D.py (refactored)
@@ -30,7 +30,7 @@
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
- raise AttributeError,name
+ raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
@@ -39,7 +39,7 @@
import types
try:
- _object = types.ObjectType
+ _object = object
_newclass = 1
except AttributeError:
class _object : pass
@@ -313,7 +313,7 @@
class b2Shape(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
Create = staticmethod(_Box2D.b2Shape_Create)
Destroy = staticmethod(_Box2D.b2Shape_Destroy)
@@ -458,7 +458,7 @@
class b2PairCallback(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_destroy__ = _Box2D.delete_b2PairCallback
b2PairCallback.PairAdded = new_instancemethod(_Box2D.b2PairCallback_PairAdded,None,b2PairCallback)
@@ -551,7 +551,7 @@
class b2DestructRefactoringTool: No changes to ./buildscripts/windows/setup.py
RefactoringTool: Refactored ./buildscripts/build_win.py
ionListener(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_destroy__ = _Box2D.delete_b2DestructionListener
b2DestructionListener.SayGoodbye = new_instancemethod(_Box2D.b2DestructionListener_SayGoodbye,None,b2DestructionListener)
@@ -560,7 +560,7 @@
class b2BoundaryListener(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_destroy__ = _Box2D.delete_b2BoundaryListener
b2BoundaryListener.Violation = new_instancemethod(_Box2D.b2BoundaryListener_Violation,None,b2BoundaryListener)
@@ -579,7 +579,7 @@
class b2ContactListener(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_destroy__ = _Box2D.delete_b2ContactListener
b2ContactListener.Add = new_instancemethod(_Box2D.b2ContactListener_Add,None,b2ContactListener)
@@ -602,7 +602,7 @@
class b2DebugDraw(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_destroy__ = _Box2D.delete_b2DebugDraw
e_shapeBit = _Box2D.b2DebugDraw_e_shapeBit
@@ -711,7 +711,7 @@
class b2Contact(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
e_nonSolidFlag = _Box2D.b2Contact_e_nonSolidFlag
e_slowFlag = _Box2D.b2Contact_e_slowFlag
@@ -892,7 +892,7 @@
class b2Joint(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
- def __init__(self): raise AttributeError, "No constructor defined"
+ def __init__(self): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
Create = staticmethod(_Box2D.b2Joint_Create)
Destroy = staticmethod(_Box2D.b2Joint_Destroy)
--- ./buildscripts/build_win.py (original)
+++ ./buildscripts/build_win.py (refactored)
@@ -37,16 +37,16 @@
sourcefiles.append(os.path.join(base, file))
#-- compile src
-print "Rebuild source? [Y/n]"
+print("Rebuild source? [Y/n]")
rebuild = sys.stdin.read(1)
#rebuild = "n"
if rebuild.lower() == "y" or rebuild.strip()=="":
for file in sourcefiles:
line=" ".join([gpp_path, gpp_opts, file])
- print "->", line
+ print("->", line)
if os.system(line) != 0:
os.system("pause")
- raise Exception, "Build error (g++)"
+ raise Exception("Build error (g++)")
exit()
flist = os.listdir(".")
@@ -58,33 +58,33 @@
#-- ar
ar_cmd=ar_path + " rcvs libBox2D.a " + " ".join(o_files)
-print "------------------------------------------------------------------------------"
-print "Building static library: -> ", ar_cmd
+print("------------------------------------------------------------------------------")
+print("Building static library: -> ", ar_cmd)
if os.system(ar_cmd) != 0:
os.system("pause")
- raise Exception, "Build error (ar)"
+ raise Exception("Build error (ar)")
#-- swig
run=" ".join([swig_path, swig_opts, iface_templ])
-print "--------------------------------------------------------------------------RefactoringTool: Refactored ./buildscripts/build_osx.py
RefactoringTool: Refactored ./buildscripts/build_linux.py
----"
-print "Executing swig ->", run
+print("------------------------------------------------------------------------------")
+print("Executing swig ->", run)
if os.system(run) != 0:
os.system("pause")
- raise Exception, "Build error (swig with template interface)"
+ raise Exception("Build error (swig with template interface)")
#-- build DLL wrapper
run=" ".join([gpp_path, os.path.splitext(iface_templ)[0] + "_wrap.cxx", wrapper_opts])
-print "------------------------------------------------------------------------------"
-print "Building DLL ->", run
+print("------------------------------------------------------------------------------")
+print("Building DLL ->", run)
if os.system(run) != 0:
os.system("pause")
- raise Exception, "Build error (swig DLL wrapper compilation)"
+ raise Exception("Build error (swig DLL wrapper compilation)")
def do_copy(src, dest):
- print "Copying %s to %s..." % (src, dest)
+ print("Copying %s to %s..." % (src, dest))
os.system(" ".join(["copy", src, dest]))
do_copy("_Box2D2.pyd", os.path.join(python_dir, "dlls\\_Box2D2.pyd"))
--- ./buildscripts/build_osx.py (original)
+++ ./buildscripts/build_osx.py (refactored)
@@ -45,14 +45,14 @@
sourcefiles.append(os.path.join(base, file))
#-- compile src
-print "Rebuild source? [Y/n]"
+print("Rebuild source? [Y/n]")
rebuild = sys.stdin.read(1)
if rebuild.lower() == "y" or rebuild.strip()=="":
for file in sourcefiles:
line=" ".join([gpp_path, gpp_opts, file])
- print "->", line
+ print("->", line)
if os.system(line) != 0:
- raise Exception, "Build error (g++)"
+ raise Exception("Build error (g++)")
exit()
flist = os.listdir(".")
@@ -64,34 +64,34 @@
#-- ar
ar_cmd=ar_path + " rcvs libBox2D.a " + " ".join(o_files)
-print "------------------------------------------------------------------------------"
-print "Building static library: -> ", ar_cmd
+print("------------------------------------------------------------------------------")
+print("Building static library: -> ", ar_cmd)
if os.system(ar_cmd) != 0:
- raise Exception, "Build error (ar)"
+ raise Exception("Build error (ar)")
exit()
#-- swig
run=" ".join([swig_path, swig_opts, "-I" + " -I".join(allsubdirs) , iface_templ])
-print "------------------------------------------------------------------------------"
-print "Executing swig ->", run
+print("------------------------------------------------------------------------------")
+print("Executing swig ->", run)
if os.system(run) != 0:
- raise Exception, "Build error (swig with template interface)"
+ raise Exception("Build error (swig with template interface)")
#-- build wrapper -> .so
run=" ".join([gpp_path, os.path.splitext(iface_templ)[0] + "_wrap.cxx", wrapper_opts])
-print "------------------------------------------------------------------------------"
-print "Building .so ->", run
+print("------------------------------------------------------------------------------")
+print("Building .so ->", run)
if os.system(run) != 0:
- raise Exception, "Build error (swig DLL wrapper compilation)"
+ raise Exception("Build error (swig DLL wrapper compilation)")
#-- link into a python liby
run=" ".join([collect2_path, collect2_opts])
-print "------------------------------------------------------------------------------"
-print "Linking to a python lib ->", run
+print("------------------------------------------------------------------------------")
+print("Linking to a python lib ->", run)
if os.system(run) != 0:
- raise Exception, "Build error (swig DLL wrapper compilation)"
+ raise Exception("Build error (swig DLL wrapper compilation)")
#cmd="sudo cp _Box2D2.so /sw/lib/python2.5/Box2D2.pyo"
#print "->", cmd
--- ./buildscripts/build_linux.py (original)
+++ ./buildscripts/build_linux.py (refactored)
@@ -34,7 +34,7 @@
from sys import argv
from sys import exit
-from urllib2 import urlopen
+from urllib.request import urlopen
def get_latest_swig_interface_file():
return urlopen("http://svn2.assembla.com/svn/elements/Box2D.i").read().strip()
@@ -48,11 +48,11 @@
# returns true if all requirements are found, false if not
# need: c++ (==) g++, swig, python2.4-dev or python2.5-dev
ok = True
- print "Checking system for requirements..."
-
- print "- Check for python ...",
+ print("Checking system for requirements...")
+
+ print("- Check for python ...", end=' ')
s = cmd_output("python --version")
- print s
+ print(s)
if "python 2.5" in s.lower():
python_ver="2.5"
elif "python 2.5" in s.lower():
@@ -61,7 +61,7 @@
python_ver="2.x"
self.python_ver = python_ver
- print "- Check for svn ......",
+ print("- Check for svn ......", end=' ')
s = popen("which svn").read().strip()
if len(s) > 0:
(pi, po) = popen4("svn --version")
@@ -69,51 +69,51 @@
s2 = s.split("\n")
for x in s2:
if "version" in x:
- print x
+ print(x)
break
else:
ok = False
- print "not found - please install 'subversion'"
+ print("not found - please install 'subversion'")
- print "- Check for g++ ......",
+ print("- Check for g++ ......", end=' ')
s = popen("which g++").read().strip()
if len(s) > 0:
s = popen("g++ --version").read().strip()
s = s.split("\n")
for x in s:
if "g++" in x:
- print x
+ print(x)
break
else:
ok = False
- print "not found - please install 'g++'"
-
- print "- Check for swig .....",
+ print("not found - please install 'g++'")
+
+ print("- Check for swig .....", end=' ')
s = popen("which swig").read().strip()
if len(s) > 0:
s = popen("swig -version").read().strip()
s = s.split("\n")
for x in s:
if "Version" in x:
- print x
+ print(x)
break
else:
ok = False
- print "not found - please install 'swig'"
+ print("not found - please install 'swig'")
- print "- Check for python%s-dev ..." % python_ver,
+ print("- Check for python%s-dev ..." % python_ver, end=' ')
s = popen("locate Python.h").read().strip()
if "/usr/include/python%s" % python_ver in s:
- print "ok"
+ print("ok")
else:
- print "not found - please install python%s-dev" % python_ver
+ print("not found - please install python%s-dev" % python_ver)
ok = False
return ok
def patch_makefile(self, makefile_text):
if "TARGETS+= Gen/float/libbox2d.so" in makefile_text:
- print "already patched"
+ print("already patched")
return False
m_arr = makefile_text.split("\n")
@@ -125,9 +125,9 @@
m_arr.insert(i+1, "TARGETS+= Gen/float/libbox2d.so")
elif "cxxflags=" in mx:
- print ">>", m
- print mx
- print "> %s asd" % str(m)
+ print(">>", m)
+ print(mx)
+ print("> %s asd" % str(m))
m_arr[i] = "CXXFLAGS= -g -O2 -fPIC"
elif "gen/float/libbox2d.a:$(" in mx:
@@ -157,7 +157,7 @@
system("cp -v Gen/float/libbox2d.* ../Library/")
chdir("..")
- print "Compiling finished"
+ print("Compiling finished")
def make_swig(self):
chdir("Library")
@@ -167,32 +167,32 @@
f.write(swig_i)
f.close()
- print "Creating Swig Wrapper..."
+ print("Creating Swig Wrapper...RefactoringTool: Refactored ./buildscripts/build_box2d.py
")
system("swig -python -c++ -includeall -ignoremissing Box2D.i")
- print "Compiling Swig Wrapper..."
+ print("Compiling Swig Wrapper...")
system("g++ -shared -fPIC -o _Box2D2.so -O3 -I/usr/include/python2.5 -L/usr/lib/python2.5 Box2D_wrap.cxx libbox2d.a")
- print "Stripping Library"
+ print("Stripping Library")
system("strip _Box2D2.so")
chdir("..")
def quit(status=0):
- print
+ print()
exit(status)
def force_input(question, possibilities):
i = ""
while i not in possibilities:
- print "%s [%s]" % (question, "/".join(possibilities)),
- i = raw_input()
+ print("%s [%s]" % (question, "/".join(possibilities)), end=' ')
+ i = input()
return i
compiler = compiler_linux()
sysok = compiler.check_system()
-print
+print()
if not sysok:
i = force_input("Try to compile anyway?", ["y", "n"])
@@ -204,7 +204,7 @@
#abspath = "/tmp"
-print "Use [%s] (work in box2d/)?" % abspath,
+print("Use [%s] (work in box2d/)?" % abspath, end=' ')
i = force_input("", ["y", "n"])
if i == "y":
@@ -212,16 +212,16 @@
else:
workpath = ""
while not path.isdir(workpath):
- print "Please enter path:",
- workpath = raw_input()
+ print("Please enter path:", end=' ')
+ workpath = input()
# Start Doing Things
-print
+print()
workpath = path.abspath(workpath)
chdir(workpath)
-print "Changed to %s" % workpath
-print "Starting SVN Checkout of Box2D (r135)"
+print("Changed to %s" % workpath)
+print("Starting SVN Checkout of Box2D (r135)")
# Check out SVN
system("svn co https://box2d.svn.sourceforge.net/svnroot/box2d/Source box2d/Source -r 135")
@@ -238,7 +238,7 @@
# Script is now in the box2d/ directory
compiler.make_swig()
-print
-print "All done. If there were no error messages, you can find the library files here now:"
-print " - %s/box2d/swig/Box2D2.py" % workpath
-print " - %s/box2d/swig/_Box2D2.so" % workpath
+print()
+print("All done. If there were no error messages, you can find the library files here now:")
+print(" - %s/box2d/swig/Box2D2.py" % workpath)
+print(" - %s/box2d/swig/_Box2D2.so" % workpath)
--- ./buildscripts/build_box2d.py (original)
+++ ./buildscripts/build_box2d.py (refactored)
@@ -35,28 +35,28 @@
def force_input(question, possibilities):
i = ""
while i not in possibilities:
- print "%s [%s]" % (question, "/".join(possibilities)),
- i = raw_input()
+ print("%s [%s]" % (question, "/".join(possibilities)), end=' ')
+ i = input()
return i
s = platformsystem()
arch, arch2 = architecture()
-print "Building Box2d & SWIG Wrapper for %s (%s)" % (s, arch)
-print
+print("Building Box2d & SWIG Wrapper for %s (%s)" % (s, arch))
+print()
if s == 'Linux':
- import build_linux
+ from . import build_linux
elif s == 'Windows':
# Windows version doesn't follow the naming scheme, it's just as released by kne
- print "To build the sources with swig on windows, you will need to:"
- print "1. Build Box2D (see BUILDING)"
- print "2. Copy the compiled libs from Source/Gen/float/lib* to Library/"
- print "3. Download the latest swig interface to Library/ (http://svn2.assembla.com/svn/elements/box2d/Box2D.i)"
- print "4. Copy build_win.py to Library/"
- print "5. Adjust the settings in build_win.py"
- print "6. Run 'python build_win.py'"
+ print("To build the sources with swig on windows, you will need to:")
+ print("1. Build Box2D (see BUILDING)")
+ print("2. Copy the compiled libs from Source/Gen/float/lib* to Library/")
+ print("3. Download the latest swig interface to Library/ (http://svn2.assembla.com/svn/elements/box2d/Box2D.i)")
+ print("4. Copy build_win.py to Library/")
+ print("5. Adjust the settings in build_win.py")
+ print("6. Run 'python build_win.py'")
# print "Please modify the settings in buildscripts/build_win.py before building"
# i = force_input("Proceed now?", ["y", "n"])
@@ -64,13 +64,13 @@
# from buildscripts import build_win
elif s == 'Darwin':
-RefactoringTool: No changes to ./buildscripts/__init__.py
RefactoringTool: Files that were modified:
RefactoringTool: ./setup.py
RefactoringTool: ./misc/environ.py
RefactoringTool: ./misc/box2d_testscripts/speedtest.py
RefactoringTool: ./misc/box2d_testscripts/elements/tools_poly.py
RefactoringTool: ./misc/box2d_testscripts/elements/elements.py
RefactoringTool: ./misc/box2d_testscripts/elements/drawing.py
RefactoringTool: ./misc/box2d_testscripts/elements/__init__.py
RefactoringTool: ./ez_setup.py
RefactoringTool: ./elements/elements.py
RefactoringTool: ./elements/drawing.py
RefactoringTool: ./elements/tools_poly.py
RefactoringTool: ./elements/tools.py
RefactoringTool: ./elements/menu.py
RefactoringTool: ./elements/locals.py
RefactoringTool: ./elements/camera.py
RefactoringTool: ./elements/callbacks.py
RefactoringTool: ./elements/add_objects.py
RefactoringTool: ./elements/__init__.py
RefactoringTool: ./documentation/dynamic/add_comment.py
RefactoringTool: ./demos/sandbox.py
RefactoringTool: ./demos/demo9_contactsound.py
RefactoringTool: ./demos/demo8_contact.py
RefactoringTool: ./demos/demo7_poly.py
RefactoringTool: ./demos/demo6_walls.py
RefactoringTool: ./demos/demo5_addmany.py
RefactoringTool: ./demos/demo4_api.py
RefactoringTool: ./demos/demo15_menu.py
RefactoringTool: ./demos/demo14_camera.py
RefactoringTool: ./demos/demo13_joints1.py
RefactoringTool: ./demos/demo12_opengl_pyglet.py
RefactoringTool: ./demos/demo11a_cairo_images.py
RefactoringTool: ./demos/demo11_cairo.py
RefactoringTool: ./contrib/menno/rendering2.py
RefactoringTool: ./contrib/josh/Physics4.activity/scenes/mixer.py
RefactoringTool: ./contrib/josh/Physics4.activity/scenes/jumble.py
RefactoringTool: ./contrib/josh/Physics4.activity/scenes/default.py
RefactoringTool: ./contrib/josh/Physics4.activity/physics.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/video.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/util.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/svgsprite.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/pausescreen.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/pangofont.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/mesh.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/gtkEvent.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/eventwrap.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/data/sleeping_svg.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/data/__init__.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/canvas.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/camera.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/activity.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/_cairoimage.py
RefactoringTool: ./contrib/josh/Physics4.activity/olpcgames/__init__.py
RefactoringTool: ./contrib/josh/Physics4.activity/elements.py
RefactoringTool: ./contrib/josh/Physics4.activity/activity.py
RefactoringTool: ./contrib/josh/Physics4.activity/Box2D.py
RefactoringTool: ./buildscripts/windows/setup.py
RefactoringTool: ./buildscripts/build_win.py
RefactoringTool: ./buildscripts/build_osx.py
RefactoringTool: ./buildscripts/build_linux.py
RefactoringTool: ./buildscripts/build_box2d.py
RefactoringTool: ./buildscripts/__init__.py
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file ./contrib/josh/Physics4.activity/olpcgames/mesh.py ###
RefactoringTool: Line 269: absolute and local imports together
RefactoringTool: ### In file ./contrib/josh/Physics4.activity/olpcgames/mesh.py ###
RefactoringTool: Line 156: could not convert: raise "Failure"
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: Line 182: could not convert: raise "Failure"
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: Line 185: could not convert: raise "Failure"
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: ### In file ./contrib/josh/Physics4.activity/olpcgames/eventwrap.py ###
RefactoringTool: Line 44: absolute and local imports together
print "To build the sources with swig on windows, you will need to:"
- print "1. Build Box2D (see BUILDING)"
- print "2. Copy the compiled lib (Source/Gen/float/libBox2d.a to Library/"
- print "3. Download the latest swig interface to Library/ (http://svn2.assembla.com/svn/elements/box2d/Box2D.i)"
- print "4. Copy build_osx.py to Library/"
- print "5. Adjust the settings in build_win.py"
- print "6. Run 'python build_osx.py'"
+ print("To build the sources with swig on windows, you will need to:")
+ print("1. Build Box2D (see BUILDING)")
+ print("2. Copy the compiled lib (Source/Gen/float/libBox2d.a to Library/")
+ print("3. Download the latest swig interface to Library/ (http://svn2.assembla.com/svn/elements/box2d/Box2D.i)")
+ print("4. Copy build_osx.py to Library/")
+ print("5. Adjust the settings in build_win.py")
+ print("6. Run 'python build_osx.py'")
# print "Please modify the settings in buildscripts/build_osx.py before building"
# i = force_input("Proceed now?", ["y", "n"])
+ exit 0
Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.41362
+ umask 022
+ /bin/mkdir -p /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ cd python3-module-elements-0.13
+ CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export FFLAGS
+ /usr/bin/python3 setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/elements
copying elements/elements.py -> build/lib/elements
copying elements/drawing.py -> build/lib/elements
copying elements/tools_poly.py -> build/lib/elements
copying elements/tools.py -> build/lib/elements
copying elements/menu.py -> build/lib/elements
copying elements/locals.py -> build/lib/elements
copying elements/camera.py -> build/lib/elements
copying elements/callbacks.py -> build/lib/elements
copying elements/add_objects.py -> build/lib/elements
copying elements/__init__.py -> build/lib/elements
+ exit 0
Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.66761
+ umask 022
+ /bin/mkdir -p /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ /bin/chmod -Rf u+rwX -- /usr/src/tmp/python3-module-elements-buildroot
+ :
+ /bin/rm -rf -- /usr/src/tmp/python3-module-elements-buildroot
+ PATH=/usr/libexec/rpm-build:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games
+ cd python3-module-elements-0.13
+ CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -flto=auto -march=i586 -mtune=generic'
+ export FFLAGS
+ /usr/bin/python3 setup.py install --skip-build --root=/usr/src/tmp/python3-module-elements-buildroot --force
running install
/usr/lib/python3/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running install_lib
creating /usr/src/tmp/python3-module-elements-buildroot
creating /usr/src/tmp/python3-module-elements-buildroot/usr
creating /usr/src/tmp/python3-module-elements-buildroot/usr/lib
creating /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3
creating /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages
creating /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/__init__.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/add_objects.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/callbacks.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/camera.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/locals.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/menu.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/tools.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/tools_poly.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/drawing.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
copying build/lib/elements/elements.py -> /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py to add_objects.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py to callbacks.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/camera.py to camera.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/locals.py to locals.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/menu.py to menu.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools.py to tools.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py to tools_poly.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py to drawing.cpython-310.pyc
byte-compiling /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py to elements.cpython-310.pyc
running install_egg_info
running egg_info
creating Elements.egg-info
writing Elements.egg-info/PKG-INFO
writing dependency_links to Elements.egg-info/dependency_links.txt
writing requirements to Elements.egg-info/requires.txt
writing top-level names to Elements.egg-info/top_level.txt
writing manifest file 'Elements.egg-info/SOURCES.txt'
reading manifest file 'Elements.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'Elements.egg-info/SOURCES.txt'
Copying Elements.egg-info to /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info
running install_scripts
+ /usr/lib/rpm/brp-alt
Cleaning files in /usr/src/tmp/python3-module-elements-buildroot (auto)
Verifying and fixing files in /usr/src/tmp/python3-module-elements-buildroot (binconfig,pkgconfig,libtool,desktop,gnuconfig)
Checking contents of files in /usr/src/tmp/python3-module-elements-buildroot/ (default)
Compressing files in /usr/src/tmp/python3-module-elements-buildroot (auto)
Adjusting library links in /usr/src/tmp/python3-module-elements-buildroot
./usr/lib: (from :0)
Verifying ELF objects in /usr/src/tmp/python3-module-elements-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal)
Bytecompiling python3 modules in /usr/src/tmp/python3-module-elements-buildroot using /usr/bin/python3
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.pyc
unlink /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.pyc
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__init__.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/camera.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/locals.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/menu.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py
Bytecompiling python3 modules with optimization in /usr/src/tmp/python3-module-elements-buildroot using /usr/bin/python3 -O
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__init__.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/camera.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/locals.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/menu.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py
Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python3-module-elements-buildroot using /usr/bin/python3 -OO
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__init__.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/camera.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/locals.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/menu.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools.py
compile /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py
Hardlinking identical .pyc and .opt-?.pyc files
'./usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-2.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-1.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.pyc'
'./usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.opt-1.pyc' => './usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.pyc'
Processing files: python3-module-elements-0.13-alt2
Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.86663
+ umask 022
+ /bin/mkdir -p /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ cd python3-module-elements-0.13
+ DOCDIR=/usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ export DOCDIR
+ rm -rf /usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ /bin/mkdir -p /usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ cp -prL LICENSE README /usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ chmod -R go-w /usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ chmod -R a+rX /usr/src/tmp/python3-module-elements-buildroot/usr/share/doc/python3-module-elements-0.13
+ exit 0
Finding Provides (using /usr/lib/rpm/find-provides)
Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.pMd2pk
find-provides: running scripts (alternatives,debuginfo,lib,pam,perl,pkgconfig,python,python3,shell)
Finding Requires (using /usr/lib/rpm/find-requires)
Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.x7bIla
find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks,systemd-services)
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/__init__.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/add_objects.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/callbacks.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/camera.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py: possible relative import from elements
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py: Ignore for REQ=slight module=cairo
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py: Ignore for REQ=slight module=pygame
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/drawing.py: Ignore for REQ=slight module=pyglet
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: possible relative import from elements
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: Ignore for REQ=slight module=Box2D
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: Ignore for REQ=slight module=cjson
/usr/lib/rpm/python3.req.py: /usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/elements.py: Ignore for REQ=slight module=pickle
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/menu.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py: possible relative import from elements
python3.req.py:/usr/src/tmp/python3-module-elements-buildroot/usr/lib/python3/site-packages/elements/tools_poly.py: possible relative import from elements
Provides: python3(elements), python3(elements.add_objects), python3(elements.callbacks), python3(elements.camera), python3(elements.drawing), python3(elements.elements), python3(elements.locals), python3(elements.menu), python3(elements.tools), python3(elements.tools_poly)
Requires: python3-module-pybox2d, /usr/lib/python3/site-packages, python3(functools) < 0, python3(math) < 0, python3(pygame) < 0, python3(pygame.locals) < 0, python3(random) < 0
Wrote: /usr/src/RPM/RPMS/noarch/python3-module-elements-0.13-alt2.noarch.rpm (w2.lzdio)
6.67user 0.49system 0:08.80elapsed 81%CPU (0avgtext+0avgdata 27976maxresident)k
0inputs+0outputs (0major+146019minor)pagefaults 0swaps
11.94user 4.11system 0:16.87elapsed 95%CPU (0avgtext+0avgdata 102512maxresident)k
0inputs+0outputs (45464major+559180minor)pagefaults 0swaps
--- python3-module-elements-0.13-alt2.noarch.rpm.repo 2020-01-14 11:47:20.000000000 +0000
+++ python3-module-elements-0.13-alt2.noarch.rpm.hasher 2022-04-16 03:40:06.543404029 +0000
@@ -1,7 +1,7 @@
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info 40755 root:root
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/PKG-INFO 100644 root:root
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/SOURCES.txt 100644 root:root
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/dependency_links.txt 100644 root:root
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/requires.txt 100644 root:root
-/usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/top_level.txt 100644 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info 40755 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/PKG-INFO 100644 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/SOURCES.txt 100644 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/dependency_links.txt 100644 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/requires.txt 100644 root:root
+/usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/top_level.txt 100644 root:root
/usr/lib/python3/site-packages/elements 40755 root:root
@@ -9,32 +9,32 @@
/usr/lib/python3/site-packages/elements/__pycache__ 40755 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.opt-1.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.opt-2.pyc 100644 root:root
-/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.opt-1.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.opt-2.pyc 100644 root:root
+/usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.pyc 100644 root:root
/usr/lib/python3/site-packages/elements/add_objects.py 100644 root:root
@@ -70,8 +70,8 @@
Provides: python3-module-elements = 0.13-alt2:sisyphus+244248.40.2.1
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info 40755 root:root
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/PKG-INFO 100644 root:root dd77a2bdcc4322ae47473e1d08a82e43
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/SOURCES.txt 100644 root:root 086d6e3c09822ea03976ab7ca9270bd9
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/requires.txt 100644 root:root 9e3c123077247c0ccc902c8644ed153d
-File: /usr/lib/python3/site-packages/Elements-0.13-py3.7.egg-info/top_level.txt 100644 root:root 5472db438a1dc3720478ccfb4f25c45d
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info 40755 root:root
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/PKG-INFO 100644 root:root 1a92753444cab28b4e45d17681be629c
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/SOURCES.txt 100644 root:root 664ca345af9a9b3834c503711a3680c9
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/dependency_links.txt 100644 root:root 68b329da9893e34099c7d8ad5cb9c940
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/requires.txt 100644 root:root 9e3c123077247c0ccc902c8644ed153d
+File: /usr/lib/python3/site-packages/Elements-0.13-py3.10.egg-info/top_level.txt 100644 root:root 5472db438a1dc3720478ccfb4f25c45d
File: /usr/lib/python3/site-packages/elements 40755 root:root
@@ -79,32 +79,32 @@
File: /usr/lib/python3/site-packages/elements/__pycache__ 40755 root:root
-File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.opt-1.pyc 100644 root:root 2f1a74ec32dd4e8c77c512533066b399
-File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.opt-2.pyc 100644 root:root 2f1a74ec32dd4e8c77c512533066b399
-File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-37.pyc 100644 root:root 2f1a74ec32dd4e8c77c512533066b399
-File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.opt-1.pyc 100644 root:root cf40567618757bd9287301c359a70ec8
-File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.opt-2.pyc 100644 root:root 81f4f265029a4189fb5581bfe6d95431
-File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-37.pyc 100644 root:root cf40567618757bd9287301c359a70ec8
-File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.opt-1.pyc 100644 root:root 5139e9cd64a3e970c7b017cfcd66b39e
-File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.opt-2.pyc 100644 root:root f2343e72459bf6b29d606ac46e286616
-File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-37.pyc 100644 root:root 5139e9cd64a3e970c7b017cfcd66b39e
-File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.opt-1.pyc 100644 root:root c56b4e377e82e5faf18040e659a50894
-File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.opt-2.pyc 100644 root:root e3a06c2c95f03073bde67e4375dd9910
-File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-37.pyc 100644 root:root c56b4e377e82e5faf18040e659a50894
-File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.opt-1.pyc 100644 root:root 356ca53b801de2d42566c6d1030138d7
-File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.opt-2.pyc 100644 root:root 5faf6c0fd3b0bdacead3f3e6e12fb0ad
-File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-37.pyc 100644 root:root 356ca53b801de2d42566c6d1030138d7
-File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.opt-1.pyc 100644 root:root 92240d7afce776a5c421835c14a9afcb
-File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.opt-2.pyc 100644 root:root 27ca4405423383321b582238384473be
-File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-37.pyc 100644 root:root 92240d7afce776a5c421835c14a9afcb
-File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.opt-1.pyc 100644 root:root 7cb097e94eed72b82351a26ff431cb5d
-File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.opt-2.pyc 100644 root:root dffe60915fba3ff3b86f4f0fc069fce2
-File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-37.pyc 100644 root:root 7cb097e94eed72b82351a26ff431cb5d
-File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.opt-1.pyc 100644 root:root 7f9c78ce979b2a16960055667e3c3889
-File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.opt-2.pyc 100644 root:root a005227f1d6c01960980f308d4cb7b87
-File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-37.pyc 100644 root:root 7f9c78ce979b2a16960055667e3c3889
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.opt-1.pyc 100644 root:root eee929605bb8e63412d9a2645e37672e
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.opt-2.pyc 100644 root:root 19ea8dce2839534304910a9e5b2e7adc
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-37.pyc 100644 root:root eee929605bb8e63412d9a2645e37672e
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.opt-1.pyc 100644 root:root b6757fce4112ff47b7f80d3111372c6b
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.opt-2.pyc 100644 root:root aa9c4b57fd6e05db0fc4354a46fe3944
-File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-37.pyc 100644 root:root b6757fce4112ff47b7f80d3111372c6b
+File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-1.pyc 100644 root:root 108c86ff1a8f9570cdfab30a3e0f8d07
+File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.opt-2.pyc 100644 root:root 108c86ff1a8f9570cdfab30a3e0f8d07
+File: /usr/lib/python3/site-packages/elements/__pycache__/__init__.cpython-310.pyc 100644 root:root 108c86ff1a8f9570cdfab30a3e0f8d07
+File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.opt-1.pyc 100644 root:root 2ad6e382171a4b76d775a4cf8e624c45
+File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.opt-2.pyc 100644 root:root 62e956fc1e25d3d64c82b459b2b8c49f
+File: /usr/lib/python3/site-packages/elements/__pycache__/add_objects.cpython-310.pyc 100644 root:root 2ad6e382171a4b76d775a4cf8e624c45
+File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.opt-1.pyc 100644 root:root 26c37df9d999ca4ea179bfbcf08ff07a
+File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.opt-2.pyc 100644 root:root fba302280db2a6730b40ec5395d25bbe
+File: /usr/lib/python3/site-packages/elements/__pycache__/callbacks.cpython-310.pyc 100644 root:root 26c37df9d999ca4ea179bfbcf08ff07a
+File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.opt-1.pyc 100644 root:root ab2b6ba7cc1dbdf22309550a790d505c
+File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.opt-2.pyc 100644 root:root 72d2828a351360908a29bcecaadd6d6f
+File: /usr/lib/python3/site-packages/elements/__pycache__/camera.cpython-310.pyc 100644 root:root ab2b6ba7cc1dbdf22309550a790d505c
+File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.opt-1.pyc 100644 root:root 8a6fcdbc37cf89622ced536c99eb949a
+File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.opt-2.pyc 100644 root:root 592bd1f88b0878b6beb615db782e6b1d
+File: /usr/lib/python3/site-packages/elements/__pycache__/drawing.cpython-310.pyc 100644 root:root 8a6fcdbc37cf89622ced536c99eb949a
+File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.opt-1.pyc 100644 root:root b9433f7060c2d4539f717b8586bccbf6
+File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.opt-2.pyc 100644 root:root 20fc9761579adc7dc628adc7b1744116
+File: /usr/lib/python3/site-packages/elements/__pycache__/elements.cpython-310.pyc 100644 root:root b9433f7060c2d4539f717b8586bccbf6
+File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.opt-1.pyc 100644 root:root 3fafbe2b98a22ec5a266dd6e7fb1af76
+File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.opt-2.pyc 100644 root:root bd15d1681bbd1345cd9a1ab735ce561a
+File: /usr/lib/python3/site-packages/elements/__pycache__/locals.cpython-310.pyc 100644 root:root 3fafbe2b98a22ec5a266dd6e7fb1af76
+File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.opt-1.pyc 100644 root:root 909940233a9737adce98279dbbca3bf4
+File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.opt-2.pyc 100644 root:root e26125b08f670e2b7ee1d8670eb04bbb
+File: /usr/lib/python3/site-packages/elements/__pycache__/menu.cpython-310.pyc 100644 root:root 909940233a9737adce98279dbbca3bf4
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.opt-1.pyc 100644 root:root 04d711003143f5890873f524850f33d5
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.opt-2.pyc 100644 root:root f31a25448e4ad1a1c3482be4b54ec039
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools.cpython-310.pyc 100644 root:root 04d711003143f5890873f524850f33d5
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.opt-1.pyc 100644 root:root b099b43f376be4d2ef156f496f6dceed
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.opt-2.pyc 100644 root:root afb656c527075a40ffda6bcbfe7f879f
+File: /usr/lib/python3/site-packages/elements/__pycache__/tools_poly.cpython-310.pyc 100644 root:root b099b43f376be4d2ef156f496f6dceed
File: /usr/lib/python3/site-packages/elements/add_objects.py 100644 root:root cf5aa422677298b8a3625055f500302b
@@ -121,2 +121,2 @@
File: /usr/share/doc/python3-module-elements-0.13/README 100644 root:root c8a26501bbfe61c82d51d54573c2c2b1
-RPMIdentity: 4a3eee81884ecd98a8eb24fd88d37e36faf2c11ea763c9f42c510d5c8758b8f46be1657596ddd79bc0807617c7cf7a15e440667d733e9b84aef73daa19dd8f98
+RPMIdentity: 17c0023f6c821c960aba910bfc89c21820eb04f0c832424947a54d39937d1fcde131380841617a2cd7561a9d23c89b54a2e84fed2d2ad44eb465f968306bf422