<86>Feb 3 01:01:44 userdel[15179]: delete user 'rooter' <86>Feb 3 01:01:44 userdel[15179]: removed group 'rooter' owned by 'rooter' <86>Feb 3 01:01:44 userdel[15179]: removed shadow group 'rooter' owned by 'rooter' <86>Feb 3 01:01:44 groupadd[15205]: group added to /etc/group: name=rooter, GID=585 <86>Feb 3 01:01:44 groupadd[15205]: group added to /etc/gshadow: name=rooter <86>Feb 3 01:01:44 groupadd[15205]: new group: name=rooter, GID=585 <86>Feb 3 01:01:44 useradd[15224]: new user: name=rooter, UID=585, GID=585, home=/root, shell=/bin/bash <86>Feb 3 01:01:44 userdel[15254]: delete user 'builder' <86>Feb 3 01:01:44 userdel[15254]: removed group 'builder' owned by 'builder' <86>Feb 3 01:01:44 groupadd[15274]: group added to /etc/group: name=builder, GID=586 <86>Feb 3 01:01:44 groupadd[15274]: group added to /etc/gshadow: name=builder <86>Feb 3 01:01:44 groupadd[15274]: new group: name=builder, GID=586 <86>Feb 3 01:01:44 useradd[15293]: new user: name=builder, UID=586, GID=586, home=/usr/src, shell=/bin/bash <13>Feb 3 01:01:49 rpmi: libexpat-2.2.4-alt0.M80P.1 1503871120 installed <13>Feb 3 01:01:49 rpmi: libgdbm-1.8.3-alt10 1454943313 installed <13>Feb 3 01:01:49 rpmi: libtinfo-devel-5.9-alt8 1456756459 installed <13>Feb 3 01:01:49 rpmi: libncurses-devel-5.9-alt8 1456756459 installed <13>Feb 3 01:01:49 rpmi: python-modules-curses-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:49 rpmi: libverto-0.2.6-alt1_6 1455633234 installed <13>Feb 3 01:01:49 rpmi: libkeyutils-1.5.10-alt0.M80P.2 p8+216694.100.6.1 1547827915 installed <13>Feb 3 01:01:49 rpmi: libcom_err-1.42.13-alt2 1449075846 installed <13>Feb 3 01:01:49 rpmi: ca-certificates-2016.02.25-alt1 1462368370 installed <13>Feb 3 01:01:49 rpmi: libcrypto10-1.0.2n-alt0.M80P.1 1512766129 installed <13>Feb 3 01:01:49 rpmi: libssl10-1.0.2n-alt0.M80P.1 1512766129 installed <86>Feb 3 01:01:49 groupadd[19625]: group added to /etc/group: name=_keytab, GID=499 <86>Feb 3 01:01:49 groupadd[19625]: group added to /etc/gshadow: name=_keytab <86>Feb 3 01:01:49 groupadd[19625]: new group: name=_keytab, GID=499 <13>Feb 3 01:01:49 rpmi: libkrb5-1.14.6-alt1.M80P.1 1525355673 installed <13>Feb 3 01:01:50 rpmi: python3-base-3.5.4-alt2.M80P.1 1527753911 installed <13>Feb 3 01:01:50 rpmi: python-modules-compiler-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python3-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Feb 3 01:01:50 rpmi: python-modules-email-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python3-3.5.4-alt2.M80P.1 1527753911 installed <13>Feb 3 01:01:50 rpmi: rpm-build-python3-0.1.10.10-alt1.M80P.1 1530521451 installed <13>Feb 3 01:01:50 rpmi: python-modules-unittest-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python3-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Feb 3 01:01:50 rpmi: python3-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed <13>Feb 3 01:01:50 rpmi: python-modules-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-ctypes-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-encodings-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-multiprocessing-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-logging-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-tools-2to3-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-xml-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-hotshot-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-modules-bsddb-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:50 rpmi: python-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:51 rpmi: python-dev-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:51 rpmi: python-module-py-1.4.34-alt0.M80P.1 1503506764 installed <13>Feb 3 01:01:51 rpmi: python-modules-json-2.7.11-alt6.M80P.1 1527682470 installed <13>Feb 3 01:01:51 rpmi: python-module-pytest-3.2.1-alt0.M80P.1 1503499784 installed <13>Feb 3 01:01:51 rpmi: python-module-setuptools-1:18.5-alt0.M80P.1 1497527461 installed Installing python-module-monsql-0.1.6-alt1.git20141222.1.1.src.rpm Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.22638 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-monsql-0.1.6 + echo 'Source #0 (python-module-monsql-0.1.6.tar):' Source #0 (python-module-monsql-0.1.6.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-monsql-0.1.6.tar + cd python-module-monsql-0.1.6 + /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: Refactored ../python3/test.py RefactoringTool: No changes to ../python3/setup.py RefactoringTool: Refactored ../python3/monsql/wrapper.py RefactoringTool: No changes to ../python3/monsql/test/index.py RefactoringTool: Refactored ../python3/monsql/sql.py --- ../python3/test.py (original) +++ ../python3/test.py (refactored) @@ -30,7 +30,7 @@ table_obj.insert({'id': id}) self.monsql.commit() - print table_obj.count() + print(table_obj.count()) assert table_obj.count() == 10 self.monsql.truncate_table(tablename) assert table_obj.count() == 0 @@ -83,7 +83,7 @@ def test_complex_queries(self): self._insert_some_row_to_table_one(10) - self.assertEquals(len(self.table_a.find({})), 10) + self.assertEqual(len(self.table_a.find({})), 10) filters_and_expected_row_nums = [ ({'number': {'$gte': 1}}, 9), @@ -157,10 +157,10 @@ def test_limit(self): self._insert_some_row_to_table_one(10) - full_rows = self.table_a.find().values() - - rows_with_limit = self.table_a.find(limit=5).values() - rows_with_limit_and_skip = self.table_a.find(limit=5, skip=5).values() + full_rows = list(self.table_a.find().values()) + + rows_with_limit = list(self.table_a.find(limit=5).values()) + rows_with_limit_and_skip = list(self.table_a.find(limit=5, skip=5).values()) self.assertEqual(full_rows[: 5], rows_with_limit) self.assertEqual(full_rows[5: ], rows_with_limit_and_skip) --- ../python3/monsql/wrapper.py (original) +++ ../python3/monsql/wrapper.py (refactored) @@ -19,15 +19,15 @@ We plan to Support Table join We would also support subquery """ -from config import ASCENDING, DESCENDING +from .config import ASCENDING, DESCENDING import MySQLdb import types from logging import Logger from datetime import * -from query import Query -from sql import build_select, build_update, build_delete, build_insert -from queryset import QuerySet -from exception import MonSQLException +from .query import Query +from .sql import build_select, build_update, build_delete, build_insert +from .queryset import QuerySet +from .exception import MonSQLException class TRANSACTION_MODE: AUTO = "auto" @@ -53,7 +53,7 @@ self.logger = Logger("std") def _log_(self, log_info): - print log_info + print(log_info) def __ensure_columns(self): if self.columns: @@ -61,7 +61,7 @@ self.__fetch_columns() def __fetch_columns(self): - sql = u"SHOW COLUMNS FROM %s" %(self.name) + sql = "SHOW COLUMNS FROM %s" %(self.name) self.cursor.execute(sql) columns = [] for column in self.cursor.fetchall(): @@ -254,7 +254,7 @@ self.__mode = mode def __ensure_table_obj(self, name): - if not self.__table_map.has_key(name): + if name not in self.__table_map: self.__table_map[name] = self.__create_table_obj(name) def get(self, name): --- ../python3/monsql/sql.py (original) +++ ../python3/monsql/sql.py (refactored) @@ -1,15 +1,15 @@ # coding=utf-8 -from query import Query, QueryCondition, value_to_sql_str +from .query import Query, QueryCondition, value_to_sql_str from datetime import datetime, date import types -from exception import MonSQLException +from .exception import MonSQLException import uuid -from config import ASCENDING, DESCENDING +from .config import ASCENDING, DESCENDING def from_none_to_null(v): if v is not None: return v - return u'null' + return 'null' def build_query(query): return QueryCondition(query).to_sql() @@ -24,15 +24,15 @@ if index == 0: value_str = field else: - value_str += u"," + field + value_str += "," + field # Where clause query_str = build_query(query) if query_str: - query_str = u"WHERE " + query_str + query_str = "WHERE " + query_str else: query_str = "" - sql = u"""SELECT %s FROM %s %s""" %(value_str, table_name, query_str) + sql = """SELECT %s FROM %s %s""" %(value_str, table_name, query_str) if sort: sort_strings = [] @@ -61,38 +61,38 @@ def build_insert(table_name, attributes): sql = "INSERT INTO %s" %(table_name) - column_str = u"" - value_str = u"" + column_str = "" + value_str = "" for index, (key, value) in enumerate(attributes.iteRefactoringTool: Refactored ../python3/monsql/queryset.py RefactoringTool: Refactored ../python3/monsql/query.py ms()): if index > 0: - column_str += u"," - value_str += u"," + column_str += "," + value_str += "," column_str += key value_str += value_to_sql_str(value) - sql = sql + u"(%s) VALUES(%s)" %(column_str, value_str) + sql = sql + "(%s) VALUES(%s)" %(column_str, value_str) return sql def build_delete(table_name, condition): query_str = build_query(condition) if not query_str: - query_str = u"" + query_str = "" else: - query_str = u"WHERE " + query_str - sql = u"DELETE FROM %s %s" %(table_name, query_str) + query_str = "WHERE " + query_str + sql = "DELETE FROM %s %s" %(table_name, query_str) return sql def build_update(table_name, condition, attributes): - sql = u"UPDATE %s SET " %(table_name) - set_str = u"" + sql = "UPDATE %s SET " %(table_name) + set_str = "" for index, (key, value) in enumerate(attributes.items()): if index > 0: - set_str += u"," - set_str += key + u"=" + value_to_sql_str(value) + set_str += "," + set_str += key + "=" + value_to_sql_str(value) query_str = build_query(condition) if query_str: - query_str = u" WHERE " + query_str + query_str = " WHERE " + query_str else: - query_str = u"" + query_str = "" sql = sql + set_str + query_str return sql --- ../python3/monsql/queryset.py (original) +++ ../python3/monsql/queryset.py (refactored) @@ -1,8 +1,8 @@ # coding=utf-8 -from query import Query -from sql import build_select -from exception import MonSQLException +from .query import Query +from .sql import build_select +from .exception import MonSQLException class DataRow: @@ -11,7 +11,7 @@ def __getattr__(self, attrname): - if self.data.has_key(attrname): + if attrname in self.data: return self.data[attrname] else: raise AttributeError('%s does not exist' %attrname) --- ../python3/monsql/query.py (original) +++ ../python3/monsql/query.py (refactored) @@ -2,7 +2,7 @@ import copy, types from datetime import datetime, date -from exception import MonSQLException +from .exception import MonSQLException """ TODO: When using Query as source, not defining fields will lead to some problem, try to fix it @@ -33,11 +33,11 @@ if v is None: return 'null' - if type(v) in (types.IntType, types.FloatType, types.LongType): + if type(v) in (int, float, int): return str(v) - if type(v) in (types.StringType, types.UnicodeType): - return "'%s'" %(v.replace(u"'", u"\\'")) + if type(v) in (bytes, str): + return "'%s'" %(v.replace("'", "\\'")) if isinstance(v, datetime): return "'%s'" %(v.strftime("%Y-%m-%d %H:%M:%S")) @@ -49,8 +49,8 @@ class QueryCondition: - MYSQL_RESERVE_WORDS = (u'index', ) - COMPLEX_QUERY_INDICATOR = (u'$not', u'$and', u'$or') + MYSQL_RESERVE_WORDS = ('index', ) + COMPLEX_QUERY_INDICATOR = ('$not', '$and', '$or') def __init__(self, condition): @@ -77,38 +77,38 @@ """ condition = self.condition - if condition is not None and len(condition.items()) > 0: - keys = condition.keys() + if condition is not None and len(list(condition.items())) > 0: + keys = list(condition.keys()) if len(keys) > 1: split_conditions = [] - for key in condition.keys(): + for key in list(condition.keys()): split_conditions.append({key: condition[key]}) return QueryCondition({'$and': split_conditions}).to_sql() else: - query_field, query_value = condition.items()[0] + query_field, query_value = list(condition.items())[0] if query_field in QueryCondition.COMPLEX_QUERY_INDICATOR: - if u'$not' == query_field: + if '$not' == query_field: not_condition = QueryCondition(query_value).to_sql() if not_condition is not None: return '!(%s)' %(not_condition) else: return None - if query_field in (u'$or', u'$and', ): + if query_field in ('$or', '$and', ): conditions = query_value if not isinstance(conditions, list) or len(conditions) < 2: raise MonSQLException('QUERY VALUE FOR KEY %s MUST BE LIST WITH LENGTH BEING AT LEAST 2' %(query_field)) - conditions = map(lambda c: QueryCondition(c).to_sql(), conditions) - conditions = filter(lambda c: c is not None, conditions) + conditions = [QueryCondition(c).to_sql() for c in conditions] + conditions = [c for c in conditions if c is not None] if len(conditions) > 0: - if query_field == u'$or': + if query_field == '$or': return ' OR '.join(conditions) - elif query_field == u'$and': + elif query_field == '$and': return ' AND '.join(conditions) else: return None @@ -118,37 +118,37 @@ if query_field in QueryCondition.MYSQL_RESERVE_WORDS: query_field = "'%s'" %(query_field) - if not type(query_value) is types.DictType: + if not type(query_value) is dict: query_value = {'$eq': query_value} - if len(query_value.keys()) > 1: + if len(list(query_value.keys())) > 1: # Deal with situation like a: {'$gt': 1, '$lt': 10} # Split into {$and: [a: {'$gt': 1}, a: {'$lt': 10}]} split_conditions = [] - for key in query_value.keys(): + for key in list(query_value.keys()): split_conditions.append(QueryCondition({query_field: {key: query_value[key]}})) return QueryCondition({'$and': split_conditions}).to_sql() else: # The simple case of {a: {$eq: 1}} - match_key = query_value.keys()[0] + match_key = list(query_value.keys())[0] match_value = query_value[match_key] query_str = None - if u"$contains" == match_key: - query_str = u"LIKE " + value_to_sql_str('%' + match_value + '%') + if "$contains" == match_key: + query_str = "LIKE " + value_to_sql_str('%' + match_value + '%') elif match_key in ('$eq', '$gte', '$gt', '$lt', '$lte'): map_dic = {'$eq': '=', '$gte': '>=', '$gt': '>', '$lt': '<', '$lte': '<='} query_str = map_dic[match_key] + value_to_sql_str(match_value) - elif u'$in' == match_key: + elif '$in' == match_key: if len(match_value) == 0: - query_str = u"IN (null) " + query_str = "IN (null) " else: - query_str = u"IN (" + u','.join([str(_v_) for _v_ in match_value]) + u") " + query_str = "IN (" + ','.join([str(_v_) for _v_ in match_value]) + ") " else: - raise MonSQLException(u"Unsupport complex query: %s" %(match_key)) + raise MonSQLException("Unsupport complex query: %s"RefactoringTool: Refactored ../python3/monsql/__init__.py RefactoringTool: Refactored ../python3/doc/source/conf.py RefactoringTool: Files that were modified: RefactoringTool: ../python3/test.py RefactoringTool: ../python3/setup.py RefactoringTool: ../python3/monsql/wrapper.py RefactoringTool: ../python3/monsql/test/index.py RefactoringTool: ../python3/monsql/sql.py RefactoringTool: ../python3/monsql/queryset.py RefactoringTool: ../python3/monsql/query.py RefactoringTool: ../python3/monsql/__init__.py RefactoringTool: ../python3/doc/source/conf.py %(match_key)) return query_field + ' ' + query_str else: --- ../python3/monsql/__init__.py (original) +++ ../python3/monsql/__init__.py (refactored) @@ -1,4 +1,4 @@ # coding=utf-8 -from wrapper import * -from config import * +from .wrapper import * +from .config import * --- ../python3/doc/source/conf.py (original) +++ ../python3/doc/source/conf.py (refactored) @@ -50,8 +50,8 @@ master_doc = 'index' # General information about the project. -project = u'MonSQL' -copyright = u'2014, firstprayer' +project = 'MonSQL' +copyright = '2014, firstprayer' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -203,8 +203,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'MonSQL.tex', u'MonSQL Documentation', - u'firstprayer', 'manual'), + ('index', 'MonSQL.tex', 'MonSQL Documentation', + 'firstprayer', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -233,8 +233,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'monsql', u'MonSQL Documentation', - [u'firstprayer'], 1) + ('index', 'monsql', 'MonSQL Documentation', + ['firstprayer'], 1) ] # If true, show URL addresses after external links. @@ -247,8 +247,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'MonSQL', u'MonSQL Documentation', - u'firstprayer', 'MonSQL', 'One line description of project.', + ('index', 'MonSQL', 'MonSQL Documentation', + 'firstprayer', 'MonSQL', 'One line description of project.', 'Miscellaneous'), ] + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.5376 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-monsql-0.1.6 + 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/monsql copying monsql/wrapper.py -> build/lib/monsql copying monsql/sql.py -> build/lib/monsql copying monsql/queryset.py -> build/lib/monsql copying monsql/query.py -> build/lib/monsql copying monsql/exception.py -> build/lib/monsql copying monsql/config.py -> build/lib/monsql copying monsql/__init__.py -> build/lib/monsql + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-monsql-0.1.6 + 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/monsql copying monsql/wrapper.py -> build/lib/monsql copying monsql/sql.py -> build/lib/monsql copying monsql/queryset.py -> build/lib/monsql copying monsql/query.py -> build/lib/monsql copying monsql/exception.py -> build/lib/monsql copying monsql/config.py -> build/lib/monsql copying monsql/__init__.py -> build/lib/monsql + popd ~/RPM/BUILD/python-module-monsql-0.1.6 + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.43383 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/python-module-monsql-buildroot + : + /bin/rm -rf -- /usr/src/tmp/python-module-monsql-buildroot + cd python-module-monsql-0.1.6 + /usr/bin/python setup.py install --skip-build --root=/usr/src/tmp/python-module-monsql-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-monsql-buildroot creating /usr/src/tmp/python-module-monsql-buildroot/usr creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7 creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/__init__.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/config.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/exception.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/query.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/queryset.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/sql.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql copying build/lib/monsql/wrapper.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/__init__.py to __init__.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/config.py to config.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/exception.py to exception.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/query.py to query.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/queryset.py to queryset.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/sql.py to sql.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/wrapper.py to wrapper.pyc running install_egg_info running egg_info creating monsql.egg-info writing requirements to monsql.egg-info/requires.txt writing monsql.egg-info/PKG-INFO writing top-level names to monsql.egg-info/top_level.txt writing dependency_links to monsql.egg-info/dependency_links.txt writing manifest file 'monsql.egg-info/SOURCES.txt' reading manifest file 'monsql.egg-info/SOURCES.txt' writing manifest file 'monsql.egg-info/SOURCES.txt' Copying monsql.egg-info to /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql-0.1.6-py2.7.egg-info running install_scripts + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-monsql-0.1.6 + python3 setup.py install --skip-build --root=/usr/src/tmp/python-module-monsql-buildroot --force running install running install_lib creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3 creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages creating /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/__init__.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/config.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/exception.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/query.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/queryset.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/sql.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql copying build/lib/monsql/wrapper.py -> /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__init__.py to __init__.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/config.py to config.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/exception.py to exception.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/query.py to query.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/queryset.py to queryset.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/sql.py to sql.cpython-35.pyc byte-compiling /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/wrapper.py to wrapper.cpython-35.pyc running install_egg_info running egg_info creating monsql.egg-info writing top-level names to monsql.egg-info/top_level.txt writing requirements to monsql.egg-info/requires.txt writing dependency_links to monsql.egg-info/dependency_links.txt writing monsql.egg-info/PKG-INFO writing manifest file 'monsql.egg-info/SOURCES.txt' reading manifest file 'monsql.egg-info/SOURCES.txt' writing manifest file 'monsql.egg-info/SOURCES.txt' Copying monsql.egg-info to /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql-0.1.6-py3.5.egg-info running install_scripts + popd ~/RPM/BUILD/python-module-monsql-0.1.6 + /usr/lib/rpm/brp-alt Cleaning files in /usr/src/tmp/python-module-monsql-buildroot (auto) Verifying and fixing files in /usr/src/tmp/python-module-monsql-buildroot (binconfig,pkgconfig,libtool,desktop) Compressing files in /usr/src/tmp/python-module-monsql-buildroot (auto) Adjusting library links in /usr/src/tmp/python-module-monsql-buildroot ./usr/lib: Verifying ELF objects in /usr/src/tmp/python-module-monsql-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-monsql-buildroot using /usr/bin/python unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/__init__.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/config.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/exception.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/query.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/queryset.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/sql.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/wrapper.pyc compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/__init__.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/config.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/exception.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/query.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/queryset.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/sql.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/wrapper.py Bytecompiling python modules with optimization in /usr/src/tmp/python-module-monsql-buildroot using /usr/bin/python -O compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/__init__.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/config.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/exception.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/query.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/queryset.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/sql.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python2.7/site-packages/monsql/wrapper.py Bytecompiling python3 modules in /usr/src/tmp/python-module-monsql-buildroot using python3 unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/__init__.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/config.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/exception.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/query.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/queryset.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/sql.cpython-35.pyc unlink /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__pycache__/wrapper.cpython-35.pyc compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__init__.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/config.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/exception.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/query.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/queryset.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/sql.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/wrapper.py Bytecompiling python3 modules with optimization in /usr/src/tmp/python-module-monsql-buildroot using python3 -O compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__init__.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/config.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/exception.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/query.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/queryset.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/sql.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/wrapper.py Bytecompiling python3 modules with optimization-2 in /usr/src/tmp/python-module-monsql-buildroot using python3 -OO compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/__init__.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/config.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/exception.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/query.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/queryset.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/sql.py compile /usr/src/tmp/python-module-monsql-buildroot/usr/lib/python3/site-packages/monsql/wrapper.py Hardlinking identical .pyc and .opt-?.pyc files './usr/lib/python3/site-packages/monsql/__pycache__/wrapper.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/wrapper.cpython-35.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/sql.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/sql.cpython-35.opt-1.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/exception.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/exception.cpython-35.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/exception.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/exception.cpython-35.opt-1.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/config.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/config.cpython-35.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/config.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/config.cpython-35.opt-1.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/__init__.cpython-35.opt-1.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/__init__.cpython-35.pyc' './usr/lib/python3/site-packages/monsql/__pycache__/__init__.cpython-35.opt-2.pyc' => './usr/lib/python3/site-packages/monsql/__pycache__/__init__.cpython-35.opt-1.pyc' Hardlinking identical .pyc and .pyo files './usr/lib/python2.7/site-packages/monsql/wrapper.pyo' => './usr/lib/python2.7/site-packages/monsql/wrapper.pyc' './usr/lib/python2.7/site-packages/monsql/exception.pyo' => './usr/lib/python2.7/site-packages/monsql/exception.pyc' './usr/lib/python2.7/site-packages/monsql/config.pyo' => './usr/lib/python2.7/site-packages/monsql/config.pyc' './usr/lib/python2.7/site-packages/monsql/__init__.pyo' => './usr/lib/python2.7/site-packages/monsql/__init__.pyc' Executing(%check): /bin/sh -e /usr/src/tmp/rpm-tmp.61264 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-monsql-0.1.6 + python setup.py test running test running egg_info deleting monsql.egg-info/requires.txt writing monsql.egg-info/PKG-INFO writing top-level names to monsql.egg-info/top_level.txt writing dependency_links to monsql.egg-info/dependency_links.txt reading manifest file 'monsql.egg-info/SOURCES.txt' writing manifest file 'monsql.egg-info/SOURCES.txt' running build_ext ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-monsql-0.1.6 + python3 setup.py test running test running egg_info writing dependency_links to monsql.egg-info/dependency_links.txt writing monsql.egg-info/PKG-INFO deleting monsql.egg-info/requires.txt writing top-level names to monsql.egg-info/top_level.txt reading manifest file 'monsql.egg-info/SOURCES.txt' writing manifest file 'monsql.egg-info/SOURCES.txt' running build_ext monsql (unittest.loader._FailedTest) ... ERROR test (unittest.loader._FailedTest) ... ERROR ====================================================================== ERROR: monsql (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: monsql Traceback (most recent call last): File "/usr/lib64/python3.5/unittest/loader.py", line 462, in _find_test_path package = self._get_module_from_name(name) File "/usr/lib64/python3.5/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/usr/src/RPM/BUILD/python3/monsql/__init__.py", line 3, in from .wrapper import * File "/usr/src/RPM/BUILD/python3/monsql/wrapper.py", line 23, in import MySQLdb ImportError: No module named 'MySQLdb' ====================================================================== ERROR: test (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test Traceback (most recent call last): File "/usr/lib64/python3.5/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.5/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/usr/src/RPM/BUILD/python3/test.py", line 7, in from monsql import MonSQL, DESCENDING File "/usr/src/RPM/BUILD/python3/monsql/__init__.py", line 3, in from .wrapper import * File "/usr/src/RPM/BUILD/python3/monsql/wrapper.py", line 23, in import MySQLdb ImportError: No module named 'MySQLdb' ---------------------------------------------------------------------- Ran 2 tests in 0.001s FAILED (errors=2) error: Bad exit status from /usr/src/tmp/rpm-tmp.61264 (%check) RPM build errors: Bad exit status from /usr/src/tmp/rpm-tmp.61264 (%check) Command exited with non-zero status 1 3.82user 0.64system 0:04.41elapsed 101%CPU (0avgtext+0avgdata 25676maxresident)k 0inputs+0outputs (0major+118520minor)pagefaults 0swaps hsh-rebuild: rebuild of `python-module-monsql-0.1.6-alt1.git20141222.1.1.src.rpm' failed. Command exited with non-zero status 1 17.61user 5.05system 0:22.67elapsed 99%CPU (0avgtext+0avgdata 125128maxresident)k 0inputs+0outputs (0major+433555minor)pagefaults 0swaps