<86>Apr 21 01:02:13 userdel[22560]: delete user 'rooter' <86>Apr 21 01:02:13 userdel[22560]: removed group 'rooter' owned by 'rooter' <86>Apr 21 01:02:13 userdel[22560]: removed shadow group 'rooter' owned by 'rooter' <86>Apr 21 01:02:13 groupadd[22617]: group added to /etc/group: name=rooter, GID=549 <86>Apr 21 01:02:13 groupadd[22617]: group added to /etc/gshadow: name=rooter <86>Apr 21 01:02:13 groupadd[22617]: new group: name=rooter, GID=549 <86>Apr 21 01:02:13 useradd[22643]: new user: name=rooter, UID=549, GID=549, home=/root, shell=/bin/bash <86>Apr 21 01:02:13 userdel[22659]: delete user 'builder' <86>Apr 21 01:02:13 userdel[22659]: removed group 'builder' owned by 'builder' <86>Apr 21 01:02:13 userdel[22659]: removed shadow group 'builder' owned by 'builder' <86>Apr 21 01:02:13 groupadd[22672]: group added to /etc/group: name=builder, GID=550 <86>Apr 21 01:02:13 groupadd[22672]: group added to /etc/gshadow: name=builder <86>Apr 21 01:02:13 groupadd[22672]: new group: name=builder, GID=550 <86>Apr 21 01:02:13 useradd[22684]: new user: name=builder, UID=550, GID=550, home=/usr/src, shell=/bin/bash <13>Apr 21 01:02:18 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Apr 21 01:02:18 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Apr 21 01:02:18 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:02:18 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Apr 21 01:02:18 rpmi: python-modules-curses-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:18 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Apr 21 01:02:18 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Apr 21 01:02:18 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Apr 21 01:02:18 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Apr 21 01:02:18 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Apr 21 01:02:18 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Apr 21 01:02:18 groupadd[33990]: group added to /etc/group: name=_keytab, GID=499 <86>Apr 21 01:02:18 groupadd[33990]: group added to /etc/gshadow: name=_keytab <86>Apr 21 01:02:18 groupadd[33990]: new group: name=_keytab, GID=499 <13>Apr 21 01:02:18 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Apr 21 01:02:19 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:02:19 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:02:19 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:19 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Apr 21 01:02:19 rpmi: libpython3-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:02:19 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:02:20 rpmi: python3-dev-3.5.4-alt2.M80P.1 1527753911 installed <13>Apr 21 01:02:20 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:02:20 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Apr 21 01:02:20 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-xml-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-hotshot-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-modules-bsddb-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:20 rpmi: python-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:21 rpmi: python-dev-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:21 rpmi: python-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Apr 21 01:02:21 rpmi: python-modules-json-2.7.11-alt6.M80P.1 1527682470 installed <13>Apr 21 01:02:21 rpmi: python-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Apr 21 01:02:21 rpmi: python-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed Installing python-module-scour-0.29-alt1.git20140726.1.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.40082 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-scour-0.29 + echo 'Source #0 (python-module-scour-0.29.tar):' Source #0 (python-module-scour-0.29.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-scour-0.29.tar + cd python-module-scour-0.29 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + find ../python3 -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 ../python3/setup.py RefactoringTool: No changes to ../python3/scour/yocto_css.py RefactoringTool: Refactored ../python3/scour/svg_transform.py RefactoringTool: Refactored ../python3/scour/svg_regex.py RefactoringTool: Refactored ../python3/scour/scour.py --- ../python3/scour/svg_transform.py (original) +++ ../python3/scour/svg_transform.py (refactored) @@ -145,7 +145,7 @@ def parse(self, text): """ Parse a string of SVG transform="" data. """ - next = self.lexer.lex(text).next + next = self.lexer.lex(text).__next__ commands = [] token = next() while token[0] is not EOF: @@ -209,7 +209,7 @@ numbers = [] token = next() # all numbers are mandatory - for i in xrange(6): + for i in range(6): number, token = self.rule_number(next, token) numbers.append(number) return numbers, token --- ../python3/scour/svg_regex.py (original) +++ ../python3/scour/svg_regex.py (refactored) @@ -145,7 +145,7 @@ def parse(self, text): """ Parse a string of SVG data. """ - next = self.lexer.lex(text).next + next = self.lexer.lex(text).__next__ token = next() return self.rule_svg_path(next, token) --- ../python3/scour/scour.py (original) +++ ../python3/scour/scour.py (refactored) @@ -45,23 +45,23 @@ # - if a has only one element in it, collapse the (ensure transform, etc are carried down) # necessary to get true division -from __future__ import division + import os import sys import xml.dom.minidom import re import math -from svg_regex import svg_parser -from svg_transform import svg_transform_parser +from .svg_regex import svg_parser +from .svg_transform import svg_transform_parser import optparse -from yocto_css import parseCssString +from .yocto_css import parseCssString # Python 2.3- did not have Decimal try: from decimal import * except ImportError: - print >>sys.stderr, "Scour requires Python 2.4." + print("Scour requires Python 2.4.", file=sys.stderr) # Import Psyco if available try: @@ -531,7 +531,7 @@ if prop in referencingProps and val != '' : if len(val) >= 7 and val[0:5] == 'url(#' : id = val[5:val.find(')')] - if ids.has_key(id) : + if id in ids : ids[id][0] += 1 ids[id][1].append(node) else: @@ -546,7 +546,7 @@ elif val[0:6] == "url('#" : id = val[6:val.find("')")] if id != None: - if ids.has_key(id) : + if id in ids : ids[id][0] += 1 ids[id][1].append(node) else: @@ -752,7 +752,7 @@ return num def unprotected_ids(doc, options): - u"""Returns a list of unprotected IDs within the document doc.""" + """Returns a list of unprotected IDs within the document doc.""" identifiedElements = findElementsWithId(doc.documentElement) if not (options.protect_ids_noninkscape or options.protect_ids_list or @@ -762,7 +762,7 @@ protect_ids_list = options.protect_ids_list.split(",") if options.protect_ids_prefix: protect_ids_prefixes = options.protect_ids_prefix.split(",") - for id in identifiedElements.keys(): + for id in list(identifiedElements.keys()): protected = False if options.protect_ids_noninkscape and not id[-1].isdigit(): protected = True @@ -785,9 +785,9 @@ global numIDsRemoved keepTags = ['font'] num = 0; - for id in identifiedElements.keys(): + for id in list(identifiedElements.keys()): node = identifiedElements[id] - if referencedIDs.has_key(id) == False and not node.nodeName in keepTags: + if (id in referencedIDs) == False and not node.nodeName in keepTags: node.removeAttribute('id') numIDsRemoved += 1 num += 1 @@ -800,7 +800,7 @@ # remove all namespace'd attributes from this element attrList = node.attributes attrsToRemove = [] - for attrNum in xrange(attrList.length): + for attrNum in range(attrList.length): attr = attrList.item(attrNum) if attr != None and attr.namespaceURI in namespaces: attrsToRemove.append(attr.nodeName) @@ -915,7 +915,7 @@ # its fill attribute is not what we want to look at, we should look for the first # non-animate/set element attrList = childElements[0].attributes - for num in xrange(attrList.length): + for num in range(attrList.length): attr = attrList.item(num) # this is most of the inheritable properties from http://www.w3.org/TR/SVG11/propidx.html # and http://www.w3.org/TR/SVGTiny12/attributeTable.html @@ -934,7 +934,7 @@ commonAttrs[attr.nodeName] = attr.nodeValue # for each subsequent child element - for childNum in xrange(len(childElements)): + for childNum in range(len(childElements)): # skip first child if childNum == 0: continue @@ -946,7 +946,7 @@ distinctAttrs = [] # loop through all current 'common' attributes - for name in commonAttrs.keys(): + for name in list(commonAttrs.keys()): # if this child doesn't match that attribute, schedule it for removal if child.getAttribute(name) != commonAttrs[name]: distinctAttrs.append(name) @@ -955,7 +955,7 @@ del commonAttrs[name] # commonAttrs now has all the inheritable attributes which are common among all child elements - for name in commonAttrs.keys(): + for name in list(commonAttrs.keys()): for child in childElements: child.removeAttribute(name) elem.setAttribute(name, commonAttrs[name]) @@ -1088,7 +1088,7 @@ # get all attribute values on this parent attrList = elem.attributes unusedAttrs = {} - for num in xrange(attrList.length): + for num in range(attrList.length): attr = attrList.item(num) if attr.nodeName in ['clip-rule', 'display-align', @@ -1104,10 +1104,10 @@ unusedAttrs[attr.nodeName] = attr.nodeValue # for each child, if at least one child inherits the parent's attribute, then remove - for childNum in xrange(len(childElements)): + for childNum in range(len(childElements)): child = childElements[childNum] inheritedAttrs = [] - for name in unusedAttrs.keys(): + for name in list(unusedAttrs.keys()): val = child.getAttribute(name) if val == '' or val == None or val == 'inherit': inheritedAttrs.append(name) @@ -1115,7 +1115,7 @@ del unusedAttrs[a] # unusedAttrs now has all the parent attributes that are unused - for name in unusedAttrs.keys(): + for name in list(unusedAttrs.keys()): elem.removeAttribute(name) num += 1 @@ -1145,7 +1145,7 @@ color = stop.getAttribute('stop-color') opacity = stop.getAttribute('stop-opacity') style = stop.getAttribute('style') - if stops.has_key(offset) : + if offset in stops : oldStop = stops[offset] if oldStop[0] == color and oldStop[1] == opacity and oldStop[2] == style: stopsToRemove.append(stop) @@ -1166,7 +1166,7 @@ identifiedElements = findElementsWithId(doc.documentElement) # make sure to reset the ref'ed ids for when we are running this in testscour - for rid,nodeCount in findReferencedElements(doc.documentElement).iteritems(): + for rid,nodeCount in findReferencedElements(doc.documentElement).items(): count = nodeCount[0] nodes = nodeCount[1] # Make sure that there's actually a defining element for the current ID name. @@ -1253,7 +1253,7 @@ # now compare stops stopsNotEqual = False - for i in xrange(stops.length): + for i in range(stops.length): if stopsNotEqual: break stop = stops.item(i) ostop = ostops.item(i) @@ -1265,16 +1265,16 @@ # ograd is a duplicate of grad, we schedule it to be removed UNLESS # ograd is ALREADY considered a 'master' element - if not gradientsToRemove.has_key(ograd): - if not duplicateToMaster.has_key(ograd): - if not gradientsToRemove.has_key(grad): + if ograd not in gradientsToRemove: + if ograd not in duplicateToMaster: + if grad not in gradientsToRemove: gradientsToRemove[grad] = [] gradientsToRemove[grad].append( ograd ) duplicateToMaster[ograd] = grad # get a collection of all elements that are referenced and their referencing elements referencedIDs = findReferencedElements(doc.documentElement) - for masterGrad in gradientsToRemove.keys(): + for masterGrad in list(gradientsToRemove.keys()): master_id = masterGrad.getAttribute('id') # print 'master='+master_id for dupGrad in gradientsToRemove[masterGrad]: @@ -1308,7 +1308,7 @@ return num def _getStyle(node): - u"""Returns the style attribute of a node as a dictionary.""" + """Returns the style attribute of a node as a dictionary.""" if node.nodeType == 1 and len(node.getAttribute('style')) > 0 : styleMap = { } rawStyles = node.getAttribute('style').split(';') @@ -1321,8 +1321,8 @@ return {} def _setStyle(node, styleMap): - u"""Sets the style attribute of a node to the dictionary ``styleMap``.""" - fixedStyle = ';'.join([prop + ':' + styleMap[prop] for prop in styleMap.keys()]) + """Sets the style attribute of a node to the dictionary ``styleMap``.""" + fixedStyle = ';'.join([prop + ':' + styleMap[prop] for prop in list(styleMap.keys())]) if fixedStyle != '' : node.setAttribute('style', fixedStyle) elif node.getAttribute('style'): @@ -1337,7 +1337,7 @@ # I've seen this enough to know that I need to correct it: # fill: url(#linearGradient4918) rgb(0, 0, 0); for prop in ['fill', 'stroke'] : - if styleMap.has_key(prop) : + if prop in styleMap : chunk = styleMap[prop].split(') ') if len(chunk) == 2 and (chunk[0][:5] == 'url(#' or chunk[0][:6] == 'url("#' or chunk[0][:6] == "url('#") and chunk[1] == 'rgb(0, 0, 0)' : styleMap[prop] = chunk[0] + ')' @@ -1345,23 +1345,23 @@ # Here is where we can weed out unnecessary styles like: # opacity:1 - if styleMap.has_key('opacity') : + if 'opacity' in styleMap : opacity = float(styleMap['opacity']) # if opacity='0' then all fill and stroke properties are useless, remove them if opacity == 0.0 : for uselessStyle in ['fill', 'fill-opacity', 'fill-rule', 'stroke', 'stroke-linejoin', 'stroke-opacity', 'stroke-miterlimit', 'stroke-linecap', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-opacity'] : - if styleMap.has_key(uselessStyle): + if uselessStyle in styleMap: del styleMap[uselessStyle] num += 1 # if stroke:none, then remove all stroke-related properties (stroke-width, etc) # TODO: should also detect if the computed value of this element is stroke="none" - if styleMap.has_key('stroke') and styleMap['stroke'] == 'none' : + if 'stroke' in styleMap and styleMap['stroke'] == 'none' : for strokestyle in [ 'stroke-width', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-linecap', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-opacity'] : - if styleMap.has_key(strokestyle) : + if strokestyle in styleMap : del styleMap[strokestyle] num += 1 # TODO: This is actually a problem if a parent element has a specified stroke @@ -1369,38 +1369,38 @@ del styleMap['stroke'] # if fill:none, then remove all fill-related properties (fill-rule, etc) - if styleMap.has_key('fill') and styleMap['fill'] == 'none' : + if 'fill' in styleMap and styleMap['fill'] == 'none' : for fillstyle in [ 'fill-rule', 'fill-opacity' ] : - if styleMap.has_key(fillstyle) : + if fillstyle in styleMap : del styleMap[fillstyle] num += 1 # fill-opacity: 0 - if styleMap.has_key('fill-opacity') : + if 'fill-opacity' in styleMap : fillOpacity = float(styleMap['fill-opacity']) if fillOpacity == 0.0 : for uselessFillStyle in [ 'fill', 'fill-rule' ] : - if styleMap.has_key(uselessFillStyle): + if uselessFillStyle in styleMap: del styleMap[uselessFillStyle] num += 1 # stroke-opacity: 0 - if styleMap.has_key('stroke-opacity') : + if 'stroke-opacity' in styleMap : strokeOpacity = float(styleMap['stroke-opacity']) if strokeOpacity == 0.0 : for uselessStrokeStyle in [ 'stroke', 'stroke-width', 'stroke-linejoin', 'stroke-linecap', 'stroke-dasharray', 'stroke-dashoffset' ] : - if styleMap.has_key(uselessStrokeStyle): + if uselessStrokeStyle in styleMap: del styleMap[uselessStrokeStyle] num += 1 # stroke-width: 0 - if styleMap.has_key('stroke-width') : + if 'stroke-width' in styleMap : strokeWidth = SVGLength(styleMap['stroke-width']) if strokeWidth.value == 0.0 : for uselessStrokeStyle in [ 'stroke', 'stroke-linejoin', 'stroke-linecap', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-opacity' ] : - if styleMap.has_key(uselessStrokeStyle): + if uselessStrokeStyle in styleMap: del styleMap[uselessStrokeStyle] num += 1 @@ -1413,18 +1413,18 @@ 'text-align', 'text-anchor', 'text-decoration', 'text-rendering', 'unicode-bidi', 'word-spacing', 'writing-mode'] : - if styleMap.has_key(fontstyle) : + if fontstyle in styleMap : del styleMap[fontstyle] num += 1 # remove inkscape-specific styles # TODO: need to get a full list of these for inkscapeStyle in ['-inkscape-font-specification']: - if styleMap.has_key(inkscapeStyle): + if inkscapeStyle in styleMap: del styleMap[inkscapeStyle] num += 1 - if styleMap.has_key('overflow') : + if 'overflow' in styleMap : # overflow specified on element other than svg, marker, pattern if not node.nodeName in ['svg','marker','pattern']: del styleMap['overflow'] @@ -1445,7 +1445,7 @@ # now if any of the properties match known SVG attributes we prefer attributes # over style so emit them and remove them from the style map if options.style_to_xml: - for propName in styleMap.keys() : + for propName in list(styleMap.keys()) : if propName in svgAttributes : node.setAttribute(propName, styleMap[propName]) del styleMap[propName] @@ -1501,7 +1501,7 @@ return result def taint(taintedSet, taintedAttribute): - u"""Adds an attribute to a set of attributes. + """Adds an attribute to a set of attributes. Related attributes are also included.""" taintedSet.add(taintedAttribute) @@ -1512,7 +1512,7 @@ return taintedSet def removeDefaultAttributeValues(node, options, tainted=set()): - u"""'tainted' keeps a set of attributes defined in parent nodes. + """'tainted' keeps a set of attributes defined in parent nodes. For such attributes, we don't delete attributes with default values.""" num = 0 @@ -1594,7 +1594,7 @@ for i in range(node.attributes.length)] for attribute in attributes: if attribute not in tainted: - if attribute in default_attributes.keys(): + if attribute in list(default_attributes.keys()): if node.getAttribute(attribute) == default_attributes[attribute]: node.removeAttribute(attribute) num += 1 @@ -1602,9 +1602,9 @@ tainted = taint(tainted, attribute) # These attributes might also occur as styles styles = _getStyle(node) - for attribute in styles.keys(): + for attribute in list(styles.keys()): if attribute not in tainted: - if attribute in default_attributes.keys(): + if attribute in list(default_attributes.keys()): if styles[attribute] == default_attributes[attribute]: del styles[attribute] num += 1 @@ -1626,7 +1626,7 @@ """ s = value - if s in colors.keys(): + if s in list(colors.keys()): s = colors[s] rgbpMatch = rgbp.match(s) @@ -1680,7 +1680,7 @@ element.setAttribute(attr, newColorValue) numBytes += (oldBytes - len(element.getAttribute(attr))) # colors might also hide in styles - if attr in styles.keys(): + if attr in list(styles.keys()): oldColorValue = styles[attr] newColorValue = convertColor(oldColorValue) oldBytes = len(oldColorValue) @@ -1722,13 +1722,13 @@ # convert absolute coordinates into relative ones. # Reuse the data structure 'path', since we're not adding or removing subcommands. # Also reuse the coordinate lists since we're not adding or removing any. - for pathIndex in xrange(0, len(path)): + for pathIndex in range(0, len(path)): cmd, data = path[pathIndex] # Changes to cmd don't get through to the data structure i = 0 # adjust abs to rel # only the A command has some values that we don't want to adjust (radii, rotation, flags) if cmd == 'A': - for i in xrange(i, len(data), 7): + for i in range(i, len(data), 7): data[i+5] -= x data[i+6] -= y x += data[i+5] @@ -1738,14 +1738,14 @@ x += sum(data[5::7]) y += sum(data[6::7]) elif cmd == 'H': - for i in xrange(i, len(data)): + for i in range(i, len(data)): data[i] -= x x += data[i] path[pathIndex] = ('h', data) elif cmd == 'h': x += sum(data) elif cmd == 'V': - for i in xrange(i, len(data)): + for i in range(i, len(data)): data[i] -= y y += data[i] path[pathIndex] = ('v', data) @@ -1761,14 +1761,14 @@ x, y = startx, starty i = 2 - for i in xrange(i, len(data), 2): + for i in range(i, len(data), 2): data[i] -= x data[i+1] -= y x += data[i] y += data[i+1] path[pathIndex] = ('m', data) elif cmd in ['L','T']: - for i in xrange(i, len(data), 2): + for i in range(i, len(data), 2): data[i] -= x data[i+1] -= y x += data[i] @@ -1784,14 +1784,14 @@ else: startx = x + data[0] starty = y + data[1] - for i in xrange(i, len(data), 2): + for i in range(i, len(data), 2): x += data[i] y += data[i+1] elif cmd in ['l','t']: x += sum(data[0::2]) y += sum(data[1::2]) elif cmd in ['S','Q']: - for i in xrange(i, len(data), 4): + for i in range(i, len(data), 4): data[i] -= x data[i+1] -= y data[i+2] -= x @@ -1803,7 +1803,7 @@ x += sum(data[2::4]) y += sum(data[3::4]) elif cmd == 'C': - for i in xrange(i, len(data), 6): + for i in range(i, len(data), 6): data[i] -= x data[i+1] -= y data[i+2] -= x @@ -1824,7 +1824,7 @@ # Reuse the data structure 'path' and the coordinate lists, even if we're # deleting items, because these deletions are relatively cheap. if not withRoundLineCaps: - for pathIndex in xrange(0, len(path)): + for pathIndex in range(0, len(path)): cmd, data = path[pathIndex] i = 0 if cmd in ['m','l','t']: @@ -2059,7 +2059,7 @@ # Reuse the data structure 'path', since we're not adding or removing subcommands. # Also reuse the coordinate lists, even if we're deleting items, because these # deletions are relatively cheap. - for pathIndex in xrange(1, len(path)): + for pathIndex in range(1, len(path)): cmd, data = path[pathIndex] if cmd in ['h','v'] and len(data) > 1: coordIndex = 1 @@ -2120,7 +2120,7 @@ # also, if 100-100 is found, split it into two also # - for i in xrange(len(ws_nums)): + for i in range(len(ws_nums)): negcoords = ws_nums[i].split("-") # this string didn't have any negative coordinates @@ -2128,7 +2128,7 @@ nums.append(negcoords[0]) # we got negative coords else: - for j in xrange(len(negcoords)): + for j in range(len(negcoords)): # first number could be positive if j == 0: if negcoords[0] != '': @@ -2251,7 +2251,7 @@ # separate from the next number. if options.renderer_workaround: if len(newData) > 0: - for i in xrange(1, len(newData)): + for i in range(1, len(newData)): if newData[i][0] == '-' and 'e' in newData[i - 1]: newData[i - 1] += ' ' return ''.join(newData) @@ -2290,7 +2290,7 @@ # gather the non-scientific notation version of the coordinate. # this may actually be in scientific notation if the value is # sufficiently large or small, so this is a misnomer. - nonsci = unicode(length).lower().replace("e+", "e") + nonsci = str(length).lower().replace("e+", "e") if not needsRendererWorkaround: if len(nonsci) > 2 and nonsci[:2] == '0.': nonsci = nonsci[1:] # remove the 0, leave the dot @@ -2300,7 +2300,7 @@ if len(nonsci) > 3: # avoid calling normalize unless strictly necessary # and then the scientific notation version, with E+NUMBER replaced with # just eNUMBER, since SVG accepts this. - sci = unicode(length.normalize()).lower().replace("e+", "e") + sci = str(length.normalize()).lower().replace("e+", "e") if len(sci) < len(nonsci): return sci else: return nonsci @@ -2337,7 +2337,7 @@ num += len(val) - len(newVal) element.setAttribute(lengthAttr, newVal) # repeat for attributes hidden in styles - if lengthAttr in styles.keys(): + if lengthAttr in list(styles.keys()): val = styles[lengthAttr] valLen = SVGLength(val) if valLen.units != Unit.INVALID: @@ -2597,7 +2597,7 @@ def embedRasters(element, options) : import base64 - import urllib + import urllib.request, urllib.parse, urllib.error """ Converts raster references to inline images. NOTE: there are size limits to base64-encoding handling in browsers @@ -2632,7 +2632,7 @@ raster = open( href, "rb") rasterdata = raster.read() elif href[:7] == 'http://': - webFile = urllib.urlopen( href ) + webFile = urllib.request.urlopen( href ) rasterdata = webFile.read() webFile.close() @@ -2714,7 +2714,7 @@ # add all the attributes attrList = node.attributes - for i in xrange(attrList.length): + for i in range(attrList.length): attr = attrList.item(i) newNode.setAttributeNS( attr.namespaceURI, attr.localName, attr.nodeValue) @@ -2778,7 +2778,7 @@ # now serialize the other attributes attrList = element.attributes - for num in xrange(attrList.length) : + for num in range(attrList.length) : attr = attrList.item(num) if attr.nodeName == 'id' or attr.nodeName == 'xml:id': continue # if the attribute value contains a double-quote, use single-quotes @@ -2877,7 +2877,7 @@ # remove the xmlns: declarations now xmlnsDeclsToRemove = [] attrList = doc.documentElement.attributes - for num in xrange(attrList.length) : + for num in range(attrList.length) : if attrList.item(num).nodeValue in unwanted_ns : xmlnsDeclsToRemove.append(attrList.item(num).nodeName) @@ -2895,7 +2895,7 @@ attrList = doc.documentElement.attributes xmlnsDecRefactoringTool: Refactored ../python3/scour/__init__.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/setup.py RefactoringTool: ../python3/scour/yocto_css.py RefactoringTool: ../python3/scour/svg_transform.py RefactoringTool: ../python3/scour/svg_regex.py RefactoringTool: ../python3/scour/scour.py RefactoringTool: ../python3/scour/__init__.py lsToRemove = [] redundantPrefixes = [] - for i in xrange(attrList.length): + for i in range(attrList.length): attr = attrList.item(i) name = attr.nodeName val = attr.nodeValue @@ -3245,7 +3245,7 @@ start = get_tick() if not options.quiet: - print >>sys.stderr, "%s %s\n%s" % (APP, VER, COPYRIGHT) + print("%s %s\n%s" % (APP, VER, COPYRIGHT), file=sys.stderr) # do the work in_string = input.read() @@ -3260,15 +3260,15 @@ # GZ: not using globals would be good too if not options.quiet: - print >>sys.stderr, ' File:', input.name, \ + print(' File:', input.name, \ os.linesep + ' Time taken:', str(end-start) + 's' + os.linesep, \ - getReport() + getReport(), file=sys.stderr) oldsize = len(in_string) newsize = len(out_string) sizediff = (newsize / oldsize) * 100 - print >>sys.stderr, ' Original file size:', oldsize, 'bytes;', \ - 'new file size:', newsize, 'bytes (' + str(sizediff)[:5] + '%)' + print(' Original file size:', oldsize, 'bytes;', \ + 'new file size:', newsize, 'bytes (' + str(sizediff)[:5] + '%)', file=sys.stderr) --- ../python3/scour/__init__.py (original) +++ ../python3/scour/__init__.py (refactored) @@ -16,7 +16,7 @@ ## ############################################################################### -import scour -import svg_regex -import svg_transform -import yocto_css +from . import scour +from . import svg_regex +from . import svg_transform +from . import yocto_css + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.55058 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-scour-0.29 + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + /usr/bin/python setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/scour copying scour/yocto_css.py -> build/lib/scour copying scour/svg_transform.py -> build/lib/scour copying scour/svg_regex.py -> build/lib/scour copying scour/scour.py -> build/lib/scour copying scour/__init__.py -> build/lib/scour + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-scour-0.29 + CFLAGS='-pipe -Wall -g -O2' + export CFLAGS + CXXFLAGS='-pipe -Wall -g -O2' + export CXXFLAGS + FFLAGS='-pipe -Wall -g -O2' + export FFLAGS + python3 setup.py build --debug running build running build_py creating build creating build/lib creating build/lib/scour copying scour/yocto_css.py -> build/lib/scour copying scour/svg_transform.py -> build/lib/scour copying scour/svg_regex.py -> build/lib/scour copying scour/scour.py -> build/lib/scour copying scour/__init__.py -> build/lib/scour + popd ~/RPM/BUILD/python-module-scour-0.29 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.24365 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-scour-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-scour-buildroot + cd python-module-scour-0.29 + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-scour-0.29 + python3 setup.py install --skip-build --root=/usr/src/tmp/python-module-scour-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-scour-buildroot creating /usr/src/tmp/python-module-scour-buildroot/usr creating /usr/src/tmp/python-module-scour-buildroot/usr/lib creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour copying build/lib/scour/__init__.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour copying build/lib/scour/scour.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour copying build/lib/scour/svg_regex.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour copying build/lib/scour/svg_transform.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour copying build/lib/scour/yocto_css.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py to __init__.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py to scour.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_regex.py to svg_regex.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_transform.py to svg_transform.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/yocto_css.py to yocto_css.cpython-35.pyc running install_egg_info running egg_info creating scour.egg-info writing scour.egg-info/PKG-INFO writing entry points to scour.egg-info/entry_points.txt writing dependency_links to scour.egg-info/dependency_links.txt writing top-level names to scour.egg-info/top_level.txt writing manifest file 'scour.egg-info/SOURCES.txt' reading manifest file 'scour.egg-info/SOURCES.txt' writing manifest file 'scour.egg-info/SOURCES.txt' Copying scour.egg-info to /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour-0.29-py3.5.egg-info running install_scripts Installing scour script to /usr/src/tmp/python-module-scour-buildroot/usr/bin + popd ~/RPM/BUILD/python-module-scour-0.29 + pushd /usr/src/tmp/python-module-scour-buildroot/usr/bin ~/tmp/python-module-scour-buildroot/usr/bin ~/RPM/BUILD/python-module-scour-0.29 ++ ls + for i in '$(ls)' + mv scour scour.py3 + popd ~/RPM/BUILD/python-module-scour-0.29 + /usr/bin/python setup.py install --skip-build --root=/usr/src/tmp/python-module-scour-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages creating /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour copying build/lib/scour/__init__.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour copying build/lib/scour/scour.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour copying build/lib/scour/svg_regex.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour copying build/lib/scour/svg_transform.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour copying build/lib/scour/yocto_css.py -> /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py to __init__.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py to scour.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_regex.py to svg_regex.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_transform.py to svg_transform.pyc byte-compiling /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/yocto_css.py to yocto_css.pyc running install_egg_info running egg_info creating scour.egg-info writing scour.egg-info/PKG-INFO writing top-level names to scour.egg-info/top_level.txt writing dependency_links to scour.egg-info/dependency_links.txt writing entry points to scour.egg-info/entry_points.txt writing manifest file 'scour.egg-info/SOURCES.txt' reading manifest file 'scour.egg-info/SOURCES.txt' writing manifest file 'scour.egg-info/SOURCES.txt' Copying scour.egg-info to /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour-0.29-py2.7.egg-info running install_scripts Installing scour script to /usr/src/tmp/python-module-scour-buildroot/usr/bin + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-scour-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python-module-scour-buildroot (binconfig,pkgconfig,libtool,desktop) Compressing files in /usr/src/tmp/python-module-scour-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-scour-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-scour-buildroot (arch=normal,fhs=normal,lfs=relaxed,lint=relaxed,rpath=normal,stack=normal,textrel=normal,unresolved=normal) Bytecompiling python modules in /usr/src/tmp/python-module-scour-buildroot using /usr/bin/python unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_regex.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_transform.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/yocto_css.pyc compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_regex.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_transform.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/yocto_css.py Bytecompiling python modules with optimization in /usr/src/tmp/python-module-scour-buildroot using /usr/bin/python -O compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_regex.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_transform.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/yocto_css.py Bytecompiling python3 modules in /usr/src/tmp/python-module-scour-buildroot using python3 unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__pycache__/scour.cpython-35.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__pycache__/svg_regex.cpython-35.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__pycache__/svg_transform.cpython-35.pyc unlink /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__pycache__/yocto_css.cpython-35.pyc compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_regex.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_transform.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/yocto_css.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python-module-scour-buildroot using python3 -O compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_regex.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_transform.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/yocto_css.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python-module-scour-buildroot using python3 -OO compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_regex.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_transform.py compile /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/yocto_css.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/scour/__pycache__/yocto_css.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/yocto_css.cpython-35.pyc' './usr/lib/python3/site-packages/scour/__pycache__/yocto_css.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/yocto_css.cpython-35.opt-1.pyc' './usr/lib/python3/site-packages/scour/__pycache__/svg_transform.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/svg_transform.cpython-35.pyc' './usr/lib/python3/site-packages/scour/__pycache__/svg_regex.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/svg_regex.cpython-35.pyc' './usr/lib/python3/site-packages/scour/__pycache__/scour.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/scour.cpython-35.pyc' './usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.pyc' './usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.opt-1.pyc' Hardlinking identical .pyc and .pyo files './usr/lib/python2.7/site-packages/scour/yocto_css.pyo' => './usr/lib/python2.7/site-packages/scour/yocto_css.pyc' './usr/lib/python2.7/site-packages/scour/svg_transform.pyo' => './usr/lib/python2.7/site-packages/scour/svg_transform.pyc' './usr/lib/python2.7/site-packages/scour/svg_regex.pyo' => './usr/lib/python2.7/site-packages/scour/svg_regex.pyc' './usr/lib/python2.7/site-packages/scour/scour.pyo' => './usr/lib/python2.7/site-packages/scour/scour.pyc' './usr/lib/python2.7/site-packages/scour/__init__.pyo' => './usr/lib/python2.7/site-packages/scour/__init__.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.61545 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-scour-0.29 + python setup.py test running test running egg_info writing scour.egg-info/PKG-INFO writing top-level names to scour.egg-info/top_level.txt writing dependency_links to scour.egg-info/dependency_links.txt writing entry points to scour.egg-info/entry_points.txt reading manifest file 'scour.egg-info/SOURCES.txt' writing manifest file 'scour.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-scour-0.29 + python3 setup.py test running test running egg_info writing scour.egg-info/PKG-INFO writing top-level names to scour.egg-info/top_level.txt writing dependency_links to scour.egg-info/dependency_links.txt writing entry points to scour.egg-info/entry_points.txt reading manifest file 'scour.egg-info/SOURCES.txt' writing manifest file 'scour.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + popd ~/RPM/BUILD/python-module-scour-0.29 + exit 0 Processing files: python-module-scour-0.29-alt1.git20140726.1.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.33179 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-scour-0.29 + DOCDIR=/usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + export DOCDIR + rm -rf /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + /bin/mkdir -p /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + cp -prL README.md /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + chmod -R go-w /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + chmod -R a+rX /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python-module-scour-0.29 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.P8bcXo 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.n9Mh3W find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) python.req: /usr/src/tmp/python-module-scour-buildroot/usr/bin/scour: skipping sys python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py: hiding scour, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py: hiding svg_regex, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py: hiding svg_transform, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/__init__.py: hiding yocto_css, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: skipping sys python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: hiding svg_regex, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: hiding svg_transform, which SEEMS TO BE SELF-SATISFIED python.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: hiding yocto_css, which SEEMS TO BE SELF-SATISFIED /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=62 IGNORE (for REQ=slight and deep=8) module=decimal /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=68 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=2599 IGNORE (for REQ=slight and deep=8) module=base64 /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=2600 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=3175 IGNORE (for REQ=slight and deep=12) module=gzip /usr/lib/rpm/python.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py: line=3239 IGNORE (for REQ=slight and deep=12) module=time shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/scour.py is not executable shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/svg_transform.py is not executable shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python2.7/site-packages/scour/yocto_css.py is not executable Provides: python2.7(scour), python2.7(scour.scour), python2.7(scour.svg_regex), python2.7(scour.svg_transform), python2.7(scour.yocto_css) Requires: /usr/bin/python, /usr/lib/python2.7/site-packages, python-modules, python2.7(pkg_resources), python2.7(xml) Processing files: python3-module-scour-0.29-alt1.git20140726.1.1 Executing(%doc): /bin/sh -e /usr/src/tmp/rpm-tmp.43304 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-scour-0.29 + DOCDIR=/usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + export DOCDIR + rm -rf /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + /bin/mkdir -p /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + cp -prL README.md /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + chmod -R go-w /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + chmod -R a+rX /usr/src/tmp/python-module-scour-buildroot/usr/share/doc/python3-module-scour-0.29 + exit 0 Finding Provides (using /usr/lib/rpm/find-provides) Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.Nl6tAC 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.J2Uhtl find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,python3,rpmlib,shebang,shell,static,symlinks) python3.req: /usr/src/tmp/python-module-scour-buildroot/usr/bin/scour.py3: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py: line=19 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py: line=20 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py: line=21 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/__init__.py: line=22 possible relative import from ., UNIMPLEMENTED python3.req: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: skipping sys /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=55 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=56 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=58 possible relative import from ., UNIMPLEMENTED /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=62 IGNORE (for REQ=slight and deep=8) module=decimal /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=68 IGNORE (for REQ=slight and deep=8) module=psyco /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=2599 IGNORE (for REQ=slight and deep=8) module=base64 /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=2600 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=2600 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=2600 IGNORE (for REQ=slight and deep=8) module=urllib /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=3175 IGNORE (for REQ=slight and deep=12) module=gzip /usr/lib/rpm/python3.req.py: /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py: line=3239 IGNORE (for REQ=slight and deep=12) module=time shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/scour.py is not executable shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/svg_transform.py is not executable shebang.req.files: executable script /usr/src/tmp/python-module-scour-buildroot/usr/lib/python3/site-packages/scour/yocto_css.py is not executable Provides: python3(scour), python3.3(scour), python3(scour.scour), python3(scour.svg_regex), python3(scour.svg_transform), python3(scour.yocto_css), python3.3(scour.scour), python3.3(scour.svg_regex), python3.3(scour.svg_transform), python3.3(scour.yocto_css) Requires: /usr/bin/python3, /usr/lib/python3/site-packages, python3(decimal) < 0, python3(math) < 0, python3(optparse) < 0, python3(os) < 0, python3(pkg_resources) < 0, python3(re) < 0, python3(xml) < 0 Wrote: /usr/src/RPM/RPMS/noarch/python-module-scour-0.29-alt1.git20140726.1.1.noarch.rpm Wrote: /usr/src/RPM/RPMS/noarch/python3-module-scour-0.29-alt1.git20140726.1.1.noarch.rpm 18.23user 1.87system 0:26.93elapsed 74%CPU (0avgtext+0avgdata 51420maxresident)k 0inputs+0outputs (0major+274301minor)pagefaults 0swaps 25.44user 5.16system 0:38.80elapsed 78%CPU (0avgtext+0avgdata 122092maxresident)k 0inputs+0outputs (0major+516629minor)pagefaults 0swaps --- python3-module-scour-0.29-alt1.git20140726.1.1.noarch.rpm.repo 2016-04-11 22:33:15.000000000 +0000 +++ python3-module-scour-0.29-alt1.git20140726.1.1.noarch.rpm.hasher 2019-04-21 01:02:51.579405895 +0000 @@ -13,2 +13,3 @@ /usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.opt-2.pyc 100644 +/usr/lib/python3/site-packages/scour/__pycache__/__init__.cpython-35.pyc 100644 /usr/lib/python3/site-packages/scour/__pycache__/scour.cpython-35.opt-1.pyc 100644 @@ -33,5 +34,9 @@ Requires: /usr/lib/python3/site-packages -Requires: python3(decimal) -Requires: python3(pkg_resources) -Requires: python3(re) +Requires: python3(decimal) < 0 +Requires: python3(math) < 0 +Requires: python3(optparse) < 0 +Requires: python3(os) < 0 +Requires: python3(pkg_resources) < 0 +Requires: python3(re) < 0 +Requires: python3(xml) < 0 Requires: rpmlib(PayloadIsLzma) @@ -39,4 +44,10 @@ Provides: python3.3(scour) +Provides: python3(scour.scour) Provides: python3(scour.svg_regex) +Provides: python3(scour.svg_transform) +Provides: python3(scour.yocto_css) +Provides: python3.3(scour.scour) Provides: python3.3(scour.svg_regex) +Provides: python3.3(scour.svg_transform) +Provides: python3.3(scour.yocto_css) Provides: python3-module-scour = 0.29-alt1.git20140726.1.1